Explain difference between PUT and PATCH requests.
Answers (1)
Add AnswerHere is the difference between PUT and PATCH Method in HTTP
PUT :- If we need to change or update my first name then send PUT request for Update :
Ex: { “first”: “Dipak”, “last”: “Suthar” }
So, here in order to update the first name we need to send all the parameters of the data again.
PATCH:
Patch request says that we would only send the data that we need to modify without modifying or effecting other parts of the data. Ex: if we need to update only the first name, we pass only the first name.
Ex: { “first”: “Dipak” }