
What are HTTP Methods?
HTTP (Hypertext Transfer Protocol) is the foundation of communication on the web. It allows clients (like your browser) and servers to exchange information. HTTP methods, also known as HTTP verbs, define the action you want to perform on a resource located on a server.
Think of HTTP methods as different types of requests you can make. For example, you might want to get data from a server, send new data, update existing data, or delete it. Each of these actions corresponds to a specific HTTP method.

In the image above, you can see the most common HTTP methods. Here’s a simple explanation of what each one does:
- GET: Used to retrieve data from a server. For example, when you visit a website, your browser sends a GET request to fetch the page.
- POST: Used to send new data to a server. For example, when you submit a form, the data is sent using a POST request.
- PUT: Used to update existing data on a server. It replaces the entire resource with the new data provided.
- DELETE: Used to remove data from a server. For example, deleting a user account.
- PATCH: Similar to PUT, but it only updates specific parts of a resource instead of replacing the entire thing.
- HEAD: Similar to GET, but it only retrieves the headers of the response, not the actual data. Useful for checking if a resource exists.
- OPTIONS: Used to describe the communication options for a resource. It tells you what methods are allowed for a specific URL.
- TRACE: Used for debugging purposes. It echoes back the received request so the client can see what changes or additions have been made by intermediate servers.
- CONNECT: Used to establish a network connection to a server, usually for secure communication (HTTPS). It creates a tunnel between the client and the server, often used for proxies.
These methods are the building blocks of how the web works. They allow applications to communicate effectively and perform actions like reading, creating, updating, and deleting data. APIs (Application Programming Interfaces) often use these methods to interact with servers and databases.
In short, HTTP methods are like commands that tell a server what to do with a resource. Whether you’re browsing the web or using an app, HTTP methods are working behind the scenes to make it all happen.