# HTTP Methods & CRUD

## What is HTTP?

HTTP stands for Hypertext Transfer Protocol. It is the underlying protocol used to transfer data over the internet or intranets in a standardized way.

## What are HTTP Methods? 🤔

**HTTP (Hypertext Transfer Protocol)** is used by web browsers and servers to communicate.

HTTP defines a set of **request methods** that indicate the desired action to be performed on a resource.

<table data-full-width="true"><thead><tr><th width="163.66666666666669">HTTP Method</th><th width="186">CRUD Operation</th><th>Description</th></tr></thead><tbody><tr><td>GET</td><td>Read</td><td>Retrieves data or resources from a server.</td></tr><tr><td>POST</td><td>Create</td><td>Submits data to create a new resource on the server.</td></tr><tr><td>PUT</td><td>Update</td><td>Sends data to update an existing resource on the server.</td></tr><tr><td>PATCH</td><td>Update</td><td>Sends a partial update to modify an existing resource on the server.</td></tr><tr><td>DELETE</td><td>Delete</td><td>Sends a request to remove a resource from the server.</td></tr></tbody></table>

The CRUD operations stand for Create, Read, Update, and Delete, representing the basic operations performed on resources in a system.&#x20;

These operations align with the corresponding HTTP methods as follows:

* Create (C): The **POST** method is used to create a new resource on the server. It submits data to be processed and stored as a new resource.
* Read (R): The **GET** method is used to retrieve data or resources from a server. It fetches the existing resources without modifying them.
* Update (U): The **PUT** and **PATCH** methods are used for updating resources on the server. **PUT** replaces the entire resource with the new data provided, while **PATCH** applies partial updates to modify specific fields of the resource.
* Delete (D): The **DELETE** method is used to remove a resource from the server. It deletes the specified resource permanently.
