HTTP Methods Reference Guide
HTTP methods (also called HTTP verbs) indicate the desired action to be performed on a resource. Each method has specific semantics regarding safety, idempotency, and cacheability.
Method Overview
| Method | Safe | Idempotent | Cacheable | Body |
|---|---|---|---|---|
| GET | Yes | Yes | Yes | No |
| HEAD | Yes | Yes | Yes | No |
| POST | No | No | Yes* | Yes |
| PUT | No | Yes | No | Yes |
| PATCH | No | No | No | Yes |
| DELETE | No | Yes | No | Maybe |
| OPTIONS | Yes | Yes | No | No |
GET
Retrieves a representation of a resource. GET requests should only retrieve data and must not have side effects (safe method). They are the most common HTTP method and can be cached, bookmarked, and shared.
GET /api/users?page=1&limit=10 Accept: application/json Authorization: Bearer <token>
POST
Submits an entity to a resource, often creating a new resource or triggering a process. POST is not idempotent — submitting the same request multiple times may create multiple resources.
POST /api/users
Content-Type: application/json
{ "name": "Jane Doe", "email": "jane@example.com" }PUT vs PATCH
PUT replaces a resource entirely and is idempotent. PATCH applies a partial update and may not be idempotent.
PUT /api/users/123
{
"name": "Jane Doe",
"email": "jane@example.com",
"role": "admin"
}PATCH /api/users/123
{
"role": "admin"
}DELETE
Removes a resource. DELETE is idempotent — calling it once or multiple times has the same effect (subsequent calls typically return 404).
DELETE /api/users/123
HEAD and OPTIONS
HEAD is identical to GET but returns only the response headers, no body. Useful for checking resource existence or metadata. OPTIONS returns the supported HTTP methods for a given endpoint, commonly used in CORS preflight requests.
Experiment with HTTP methods using our REST Client or convert cURL commands to JavaScript fetch with the cURL to Fetch Converter.