🍊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.
HTTP Method | CRUD Operation | Description |
---|---|---|
GET | Read | Retrieves data or resources from a server. |
POST | Create | Submits data to create a new resource on the server. |
PUT | Update | Sends data to update an existing resource on the server. |
PATCH | Update | Sends a partial update to modify an existing resource on the server. |
DELETE | Delete | Sends a request to remove a resource from the server. |
The CRUD operations stand for Create, Read, Update, and Delete, representing the basic operations performed on resources in a system.
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.
Last updated