HTTP Methods Reference

Complete guide to HTTP request methods and their properties

Method Summary

All standard HTTP methods and their key properties:

Method Purpose Request Body Response Body Safe Idempotent Cacheable
GET Retrieve a resource No Yes Yes Yes Yes
HEAD Get headers only No No Yes Yes Yes
POST Submit data / Create resource Yes Yes No No Conditional
PUT Replace entire resource Yes Optional No Yes No
PATCH Partial modification Yes Yes No No* No
DELETE Remove a resource Optional Optional No Yes No
OPTIONS Describe communication options Optional Yes Yes Yes No
CONNECT Establish tunnel No No No No No
TRACE Loop-back diagnostic No Yes Yes Yes No

* PATCH idempotency depends on the patch format used

Property Definitions

Property Meaning Why It Matters
Safe Does not modify server state Safe methods can be prefetched, cached, and retried without side effects
Idempotent Multiple identical requests = same result as one Idempotent methods can be safely retried on network failure
Cacheable Response can be stored for future use Cacheable methods improve performance and reduce server load

Method Details

GET

Retrieves a representation of the specified resource. The most common HTTP method.

RFC9110 Section 9.3.1
Request BodyNot allowed (semantically meaningless)
Successful Response200 OK with resource in body
Use CasesFetching web pages, API data, images, files

Identical to GET but returns only headers, no body. Useful for checking resource metadata.

RFC9110 Section 9.3.2
Request BodyNot allowed
Successful Response200 OK with headers only (no body)
Use CasesCheck if resource exists, get file size, validate cache

POST

Submits data to be processed. Creates new resources or triggers actions.

RFC9110 Section 9.3.3
Request BodyRequired (contains data to process)
Successful Response201 Created (new resource) or 200 OK (action)
Use CasesForm submissions, file uploads, creating records

PUT

Replaces the entire resource at the target URL. Creates if it doesn't exist.

RFC9110 Section 9.3.4
Request BodyRequired (complete resource representation)
Successful Response200 OK or 204 No Content (update), 201 Created (new)
Use CasesFull resource updates, file uploads to specific URLs

PATCH

Applies partial modifications to a resource. More efficient than PUT for small updates.

RFC5789
Request BodyRequired (patch instructions or partial data)
Successful Response200 OK or 204 No Content
Use CasesUpdating specific fields, JSON Patch operations

DELETE

Removes the specified resource from the server.

RFC9110 Section 9.3.5
Request BodyOptional (rarely used)
Successful Response200 OK, 202 Accepted (queued), or 204 No Content
Use CasesRemoving records, files, or relationships

OPTIONS

Describes available communication options for the target resource. Used for CORS preflight.

RFC9110 Section 9.3.7
Request BodyOptional
Successful Response200 OK or 204 No Content with Allow header
Use CasesCORS preflight, API discovery

CONNECT

Establishes a tunnel to the server, typically for HTTPS through an HTTP proxy.

RFC9110 Section 9.3.6
Request BodyNot allowed
Successful Response200 Connection Established
Use CasesHTTPS proxying, WebSocket upgrades through proxies

TRACE

Performs a message loop-back test for debugging. Usually disabled for security.

RFC9110 Section 9.3.8
Request BodyNot allowed
Successful Response200 OK with request echoed in body
Use CasesDebugging proxy chains (rarely used)

REST API Patterns

Standard method usage for CRUD operations:

Operation Method URL Pattern Example
List all GET /resources GET /users
Get one GET /resources/{id} GET /users/42
Create POST /resources POST /users
Replace PUT /resources/{id} PUT /users/42
Update PATCH /resources/{id} PATCH /users/42
Delete DELETE /resources/{id} DELETE /users/42

When to Use Each Method

If you want to... Use Not
Fetch data without side effects GET POST
Create a new resource (server assigns ID) POST PUT
Create/replace resource (client specifies ID) PUT POST
Update a few fields of a resource PATCH PUT
Replace entire resource with new version PUT PATCH
Remove a resource DELETE POST /delete
Check if resource exists (without body) HEAD GET
Query allowed methods / CORS preflight OPTIONS GET