HTTP Methods Reference
HTTP methods define the operation a client performs on a resource. This table covers 9 standard methods with safe/idempotent flags, request body and typical use.
How It Works
HTTP methods (verbs) express the action semantics on a resource. GET reads, POST creates, PUT replaces wholly, PATCH edits partially, DELETE removes. Safe methods (GET/HEAD/OPTIONS) only read and do not change server state.
Idempotence means repeated identical requests equal one: GET/PUT/DELETE are idempotent, POST is not (retrying may create duplicates). RESTful design and infrastructure (caches, retries) rely on these guarantees.
| Method | Safe | Idempotent | Body | Description |
|---|---|---|---|---|
| GET | Yes | Yes | No | Retrieve a representation; safe, idempotent, cacheable. |
| HEAD | Yes | Yes | No | Like GET but no body; used to inspect headers only. |
| POST | No | No | Yes | Submit data to process; usually creates a sub-resource. Not safe/idempotent. |
| PUT | No | Yes | Yes | Replace the entire resource with the payload. Idempotent. |
| PATCH | No | No | Yes | Apply partial modifications to a resource. Not idempotent. |
| DELETE | No | Yes | Optional | Delete the resource. Idempotent. |
| OPTIONS | Yes | Yes | No | Describe communication options; used in CORS preflight. |
| CONNECT | No | No | No | Establish a tunnel to the server (e.g. HTTPS via proxy). |
| TRACE | Yes | Yes | No | Echo the request for diagnostics; often disabled for security. |
Frequently Asked Questions
What is the difference between GET and POST?
GET retrieves a resource with params in the URL; it is safe, idempotent and cacheable. POST submits data in the body; it is neither safe nor idempotent and is not cached by default.
What is the difference between PUT and PATCH?
PUT replaces the entire target resource with the full representation (idempotent). PATCH applies partial changes with only the fields to modify (not idempotent).
What does idempotent mean?
Making the same request once or many times results in the same final server state. GET/PUT/DELETE are idempotent; POST/PATCH are not. Idempotence lets clients safely retry after a timeout.
What is the OPTIONS method for?
It returns the HTTP methods a resource supports. Its most common use is the CORS preflight request that browsers send automatically before a cross-origin request.