2 ms·
Somewhat agreed, I see them as: PUT - is effectively an "upsert" at a specific url. Doesn't exist? Create it, does exist? replace it. PATCH - update a resourc
by samwillis 3y ago
Somewhat agreed, I see them as:
PUT - is effectively an "upsert" at a specific url. Doesn't exist? Create it, does exist? replace it.
PATCH - update a resource with a diff, at a specific url.
POST - this is a RPC, in the case of a REST API it can be used to create a new resource where the "id" is not provided and set by the server, it then redirects to the new url.
POST can be used for any RPC endpoints, even as part of a REST api.