I don't know exact difference between PATCH and PUT method. Can anyone tell me when we should use this methods with proper example.
Put is when you update the whole model and use patch when you want to update a portion or single attribute. For instance, a user may have a username they change that is stored on the user model. You would patch just the username when they change it. If you would like to replace the whole user model with a new user model you would use a put request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With