Skip to content

re: Explain HTTP Verbs like I'm Five VIEW POST

re: When you are playing with your toys you can: GET your toys from the shelves PUT new paint on them when they scratch POST a new toy on the shelf to ...

It was quite easy to understand buddy, but what about patch?


I never saw a REST implementation to differentiate the PATCH vs PUT. In most real world examples you will use only GET and POST, it's best for everyone to have fewer endpoints and commands. If the POST has an UUID then is an update (PATCH), and PUT you almost never want/need it, because you don't want to carry around the entire records,only the fields you are interested in.

In order to differentiate between the POST/PUT/PATCH you have to know the state of the record, and it's hard to do in a distributed system, in a app that the user can be logged in from multiple devices in the same time, etc etc.

Anyway I'll try to remix it

PATCH - new paint only on the part it was scratched
PUT - new paint on the entire toy, even if it had a small scratch. If you want to keep the "good" scratches that you are bond to (for melancholic reasons) you have to recreate them.

code of conduct - report abuse