Widely used HTTP Methods RapidAPI Comic.
HTTP GET request diagram. The client sends a GET request to fetch a specific resource. If successful, the server responds with a 200 (OK) status code and the requested resource.
HTTP POST request. The client sends a POST request to submit new information to the server, for example, an HTTP form. The server responds with a 201 (Created) status code if successful. Successive POST requests to the server will make multiple new resources. This means POST is not idempotent because it can change the state of the server.
HTTP PUT request. PUT requests are also used to create or update a resource, but unlike POST requests, they do not change the server's state after the initial request. This makes them idempotent. On success, POST requests return a 200(OK), 201(Created), or 204(No Content) status code.
The HTTP PATCH Method is similar to PUT because it updates resources, but PATCH only updates a specified part instead of the entire resource. This could be used to update a particular piece of user information, for example, an email address. A successful PATCH request will return a status code within the 200 - 299 range.
The HTTP DELETE request deletes the specified resource from the server. It is idempotent and identifies the resource to be deleted by the request URL. On success, delete requests will return a 200(OK), 202(Accepted), or 204(No Content) status code.