HTTP methods reference
A quick, searchable table of the HTTP methods defined by RFC 9110 — GET,
HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE and CONNECT — and
the properties that matter when designing an API. It is a fast way to settle “is
this idempotent?” and “can I cache this?” questions while building REST endpoints.
The three properties that shape API design
Safe
A method is safe if it is read-only by design — it must not modify server state. GET, HEAD, OPTIONS and TRACE are safe. Safe methods can be called freely by browsers, crawlers and prefetch mechanisms without side effects. A GET request should never delete a resource — ever.
Idempotent
A method is idempotent if sending it once or ten times leaves the server in the same state. GET, HEAD, PUT, DELETE, OPTIONS and TRACE are idempotent. Idempotency is what makes retries safe: if a network error causes a PUT to time out, you can safely retry it. POST and PATCH are not idempotent — POST-ing twice may create two resources; PATCH-ing twice may compound a change (for example “add 1” applied twice adds 2).
Cacheable
Only GET and HEAD are cacheable by default per RFC 9110. POST responses may be cached if the server includes explicit freshness headers, but this is uncommon. All other methods are not cacheable. Caches bypass non-cacheable methods entirely, which is why GET should be used for any read that benefits from caching.
Full method table
| Method | Safe | Idempotent | Cacheable | Request body | Typical use |
|---|---|---|---|---|---|
GET | Yes | Yes | Yes | No | Retrieve a resource |
HEAD | Yes | Yes | Yes | No | Headers only — check existence or freshness |
POST | No | No | Rarely | Yes | Create a resource; submit data |
PUT | No | Yes | No | Yes | Replace a resource at a known URL |
PATCH | No | No | No | Yes | Partially update a resource |
DELETE | No | Yes | No | Optional | Remove a resource |
OPTIONS | Yes | Yes | No | No | Discover allowed methods; CORS preflight |
TRACE | Yes | Yes | No | No | Loop-back diagnostic (rarely used; often disabled) |
CONNECT | No | No | No | N/A | Tunnel (used by HTTPS proxies) |
When to use PUT vs PATCH vs POST
This is the most common source of REST API design confusion:
POST /articles— the server assigns the new article’s URL. Not idempotent: two calls may create two articles.PUT /articles/42— replace article 42 entirely with the body you send. Idempotent: the same body sent twice produces the same result.PATCH /articles/42— apply a partial change. Not idempotent if the patch is relative (e.g. “increment views by 1”). Idempotent only if the patch is absolute (e.g. “set title to X”).
CONNECT and OPTIONS in practice
OPTIONS is the method browsers send automatically as a CORS preflight request — they send OPTIONS before a cross-origin POST/PUT/DELETE to ask the server which origins and methods it permits. Your API needs to handle OPTIONS for CORS to work.
CONNECT is used by HTTP proxies to establish a tunnel for HTTPS: the client sends CONNECT example.com:443 to the proxy, and the proxy opens a raw TCP tunnel. You rarely write CONNECT handlers yourself; it is handled by proxy software.
Everything runs in your browser; nothing is uploaded.