Striving to become a master Go/Cloud developer; Father ๐จโ๐งโ๐ฆ; ๐ค/((Full Stack Web|Unity3D) + Developer)/g; Science supporter ๐ฉโ๐ฌ; https://coder.today
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.
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.
Simply awesome :)