PUT is used by FB to update the comment because an existing resource is being updated, and that is what PUT does (updates a resource). PUT happens to be idempotent, in contrast to POST.
First of all, some definitions: PUT is defined in Section 9.6 RFC 2616: The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an a...
Use of PUT vs PATCH methods in REST API real life scenarios
Difference between PUT, POST, GET, DELETE and PATCH in HTTP Verbs: The most commonly used HTTP verbs POST, GET, PUT, DELETE are similar to CRUD (Create, Read, Update and Delete) operations in database. We specify these HTTP verbs in the capital case. Below is the comparison between them. Create - POST Read - GET Update - PUT Delete - DELETE PATCH: Submits a partial modification to a resource ...
The expected method for updating an existing record is PUT. So your choice should be PUT. POST is generally used for inserting a new record with a brand new content like in the example below: ... So in your case you do not need any POST operation because PUT for upsert operation also covers that.
When embedding JavaScript in an HTML document, where is the proper place to put the