xxxxxxxxxx
POST is always for creating a resource
( does not matter if it was duplicated )
PUT is for checking if resource exists then update,
else create new resource.
PATCH is always for updating a resource.
GET is to read a record.
DELETE is to delete a record.
xxxxxxxxxx
POST - Create NEW record
PUT - If the record exists, update else, create a new record
PATCH - update
GET - read
DELETE - delete
xxxxxxxxxx
POST ===> always for creating a resource ( does not matter if it was duplicated )
PUT ===> for checking if resource exists then update, else create new resource
PATCH ===> always for updating a resource