HTTP actions for a Restful API
Here is a breakdown of all the HTTP verbs used when building a Restful API:
Get: Get requests are used to retrieve information. The resource is not modified in any way. Multiple get requests to the same resource would result in the same resource being sent back identically each time.
Post: Sending a request to the server with new data to be saved. It creates an entirely new resource.
Put: Similar to a post request but does not replace the entire resource, it instead updates an existing one. If the resource does not exist, the API can decide to create a new one.
Delete: Delete requests delete the entire resource. Multiple attempts to delete the same resource will not change the outcome.
Patch: Similar to a Put request but it only updates a partial resource and does not create a new one.