GETis by far the most important method. It is used to request and retrieve data, a document or another source from a server. A source is identified by the request URL.
POSTfollows the opposite approach: it primarily transmits data (in form of an URL) to a web server. Requests are used to send data to the API server to create or update resources. The data sent to the server is stored in the request body of the HTTP request.
PUTrequests allow modification of existing sources or creation of new data on the server, they are used to send data to the API to update or create a resource. Unlike the POST method, the URL in the PUT request identifies the data itself sent with the request, not the source.
PATCHrequests are used to only apply partial modifications to the resource.
DELETErequests are used to delete the resource at the specified URL.
HEADis almost identical to
GET, except without the response body. Unlike GET, however, the server does not transmit the actual data. In other words, if
/alarmsdelivers a list of alarms, then
/alarmswill make the same request, but won't get back the list of alarms.