1

Both work like same to change but for as programming standards in which situation use put method or patch method.

Divyang Desai
  • 7,483
  • 13
  • 50
  • 76
Lalji Dhameliya
  • 1,729
  • 1
  • 17
  • 26

1 Answers1

0

I understand, PATCH is used for updating partial data (a few fields) and PUT is used for updating all the data (all fields).

Example 1: You have a profile settings page and in the form you want to change only your name but not your twitter account and github account. You'll only update part of the data. For that, you will use a PATCH request.

Example 2: You have a form with location settings where you have to change all of the fields: City, Country, Zip Code, Address etc. For that, you'll use a PUT request

Divyang Desai
  • 7,483
  • 13
  • 50
  • 76