Method Details
GET
Retrieves a representation of the specified resource. The most common HTTP method.
| RFC | 9110 Section 9.3.1 |
| Request Body | Not allowed (semantically meaningless) |
| Successful Response | 200 OK with resource in body |
| Use Cases | Fetching web pages, API data, images, files |
HEAD
Identical to GET but returns only headers, no body. Useful for checking resource metadata.
| RFC | 9110 Section 9.3.2 |
| Request Body | Not allowed |
| Successful Response | 200 OK with headers only (no body) |
| Use Cases | Check if resource exists, get file size, validate cache |
POST
Submits data to be processed. Creates new resources or triggers actions.
| RFC | 9110 Section 9.3.3 |
| Request Body | Required (contains data to process) |
| Successful Response | 201 Created (new resource) or 200 OK (action) |
| Use Cases | Form submissions, file uploads, creating records |
PUT
Replaces the entire resource at the target URL. Creates if it doesn't exist.
| RFC | 9110 Section 9.3.4 |
| Request Body | Required (complete resource representation) |
| Successful Response | 200 OK or 204 No Content (update), 201 Created (new) |
| Use Cases | Full resource updates, file uploads to specific URLs |
PATCH
Applies partial modifications to a resource. More efficient than PUT for small updates.
| RFC | 5789 |
| Request Body | Required (patch instructions or partial data) |
| Successful Response | 200 OK or 204 No Content |
| Use Cases | Updating specific fields, JSON Patch operations |
DELETE
Removes the specified resource from the server.
| RFC | 9110 Section 9.3.5 |
| Request Body | Optional (rarely used) |
| Successful Response | 200 OK, 202 Accepted (queued), or 204 No Content |
| Use Cases | Removing records, files, or relationships |
OPTIONS
Describes available communication options for the target resource. Used for CORS preflight.
| RFC | 9110 Section 9.3.7 |
| Request Body | Optional |
| Successful Response | 200 OK or 204 No Content with Allow header |
| Use Cases | CORS preflight, API discovery |
CONNECT
Establishes a tunnel to the server, typically for HTTPS through an HTTP proxy.
| RFC | 9110 Section 9.3.6 |
| Request Body | Not allowed |
| Successful Response | 200 Connection Established |
| Use Cases | HTTPS proxying, WebSocket upgrades through proxies |
TRACE
Performs a message loop-back test for debugging. Usually disabled for security.
| RFC | 9110 Section 9.3.8 |
| Request Body | Not allowed |
| Successful Response | 200 OK with request echoed in body |
| Use Cases | Debugging proxy chains (rarely used) |