
HTTPRequestResponseRESTCRUDNode.jsAPI
All HTTP Request Methods
HTTP Methods Explained with Examples
Understanding HTTP methods is essential for working with APIs and building web applications. Each method defines a specific type of action that a client can perform on a resource. This image is an illustrated overview of all standard HTTP methods and their typical descriptions.
🟢 GET
- Purpose: Retrieve data from the server.
- Example:
GET /users
- Idempotent: ✅
🟡 POST
- Purpose: Submit data to create a new resource.
- Example:
POST /users
- Idempotent: ❌
🔵 PUT
- Purpose: Replace a resource completely.
- Example:
PUT /users/123
- Idempotent: ✅
🟠 PATCH
- Purpose: Partially update a resource.
- Example:
PATCH /users/123
- Idempotent: ✅
🔴 DELETE
- Purpose: Remove a resource.
- Example:
DELETE /users/123
- Idempotent: ✅
⚪ HEAD
- Purpose: Same as GET, but returns only headers.
- Example:
HEAD /users
- Idempotent: ✅
🟣 OPTIONS
- Purpose: Describes allowed methods on a resource.
- Example:
OPTIONS /users
- Idempotent: ✅
⚫ CONNECT
- Purpose: Establish a tunnel to the server.
- Example:
CONNECT example.com:443
- Idempotent: ❌
Each of these methods plays a critical role in RESTful API design. By understanding when and how to use them, you can write more efficient, predictable, and scalable APIs. You can freely download this image from below. Attribution or a link back to this page is required. Thanks for giving credit!
Resolution
4000x2250
Size
1.8 MB
Format
PNG