2

Can anyone please explain what is the difference between PUT and POST request.Also I want to know about PATCH request.

Naqi
  • 144
  • 2
  • 9
  • 4
    This has already been asked and answered here. http://stackoverflow.com/questions/107390/whats-the-difference-between-a-post-and-a-put-http-request – Qyaffer Feb 04 '17 at 15:56
  • http://stackoverflow.com/q/630453/7012517 refer to this if u are confused what to use.. – Shobhit Feb 04 '17 at 16:19

1 Answers1

-2
  • POST should be used to create a resource
  • PUT should be used to update a resource
  • PATCH request should be used when you want to update just a part of the resource.

EXAMPLE:

  • Creating a new user
  • POST Update the user (first name, last name, address, city, etc.)
  • PUT PATCH - change the user's password
Kate Orlova
  • 3,225
  • 5
  • 11
  • 35
SasaFajkovic
  • 395
  • 1
  • 4
  • 16