Satish Hirpara
Difference between PUT and PATCH Method in HTTP

PUT

If I had to change my firstname then send PUT request for Update:

{ “first”: “Nazmul”, “last”: “hasan” } 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.

By Satish Hirpara in .NET on Jul 04 2020
  • Shweta Lodha
    Jul, 2020 21

    PUT is for complete entity replacement whereas PATCH is to partially update the entity.

    • 1
  • Gauri Gonjari
    Jun, 2021 17

    put method idempotent. means if you send a request multiple time still response will be the same.

    use PUT method for complete replcement of the resouce.

    Patch method is partially idempotent. with each request you may get different response.

    Use PUT for partial update

    • 0
  • Varun Setia
    Jul, 2020 27

    PUT is a full update. PATCH is partial update.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS