What are HTTP verbs?

Rehan Meer
2 min readJun 19, 2023

--

HTTP, an acronym for Hyper Text Transfer Protocol, is an application layer, stateless protocol for client-server communication which allows the client to retrieve and transmit data to servers.

Fig. 1 : HTTP Protocol

HTTP protocol contains a set of request methods often called HTTP verbs, that indicate the intended action to be done on a resource. Let’s just skim through most common HTTP verbs.

1. GET

The GET request is used to read the resource from the server. When the server receives the GET request, it responds back to the request by returning an HTTP response containing the requested data(if it exists) in the response body.

2. POST

The POST request is used to create new resources on the server by sending the data in the request body The server processes the POST request by performing actions like storing the data or modifying the server’s state depending upon the received information.

3. PUT

The PUT request is used to create or replace an existing resource on the server. The client sends a PUT request to a web server containing the data in the request body. If the resource already exists on the server, it will be replaced with the data in the PUT request; otherwise, the PUT request will result in the creation of a new resource.

4. PATCH

The PATCH request is used to partially update an existing resource on a web server. PATCH request contains specific changes to be applied to the resource not the complete resource in the request body .Unlike the PUT request, which replaces the entire resource, the PATCH request allows for making partial changes to the resource.

5. DELETE

The DELETE request is used to delete the specified resource from a web server. The DELETE request contains the URL of the resource that needs to be deleted. The server processes the request and, if the resource exists, removes it from the server.

Conclusion

HTTP verbs provide a standardized set of actions and a basic understanding of above HTTP verbs will help you to adapt to new types of HTTP requests which would ultimately result in efficient and effective interaction between the client and web server.

--

--

Rehan Meer
Rehan Meer

No responses yet