How HTTP Works

Reference

HTTP Methods

Start here when you know what your endpoint should do, but you are not sure which verb makes the contract honest.

Method properties at a glance

Per RFC 9110 section 9. Rarely means cacheable only with explicit freshness information.

Safe, idempotent, cacheable, and body semantics for each HTTP method
MethodSafeIdempotentCacheableRequest bodyResponse bodyTypical use
GETYesYesYesNo defined meaningYesRead a resource
HEADYesYesYesNo defined meaningNeverRead headers only
POSTNoNoRarelyYesYesProcess or create
PUTNoYesNoYesOptionalReplace a resource
PATCHNoNoRarelyYesOptionalPartial update
DELETENoYesNoNo defined meaningOptionalRemove a resource
OPTIONSYesYesNoOptionalOptionalDiscover capabilities
CONNECTNoNoNoNo defined meaningNone after 2xx (tunnel)Open a proxy tunnel
TRACEYesYesNoNot allowedEcho of the requestLoop-back diagnostics
QUERYYesYesYesRequiredYesRead with a request body

Every method, in depth

Pick The Verb Before You Pick The Route

Most method mistakes come from treating every write as POST. The better question is: what promise does this endpoint make to the caller? Method choice affects retries, caching, browser behavior, and how other developers read your API.

Safe methods
GET, HEAD, OPTIONS, TRACE, and the newer QUERY are for reads, previews, and capability checks. If one of them changes data, your API will surprise clients and caches.
Idempotent methods
PUT and DELETE are easier to retry because repeating the same request should leave the resource in the same end state.
Cache-aware methods
GET plays well with browser history, links, and caches. POST usually does not unless you add explicit rules.
Write methods
POST, PUT, PATCH, and DELETE all change state, but they signal different intent: create, replace, partially update, or remove.

Use This Hub When You Are Stuck On

This page is most useful when the route is easy to name but the semantics are still fuzzy.

  • Whether a handler should create something new, replace a known resource, or patch part of it.
  • Whether a client or job runner can safely retry after a timeout.
  • Why a browser form, CDN, or API client is behaving differently because the verb changed.

Questions API Teams Ask

When should I use PUT instead of PATCH?

Use PUT when the client can send the full intended representation of the resource. Use PATCH when it only knows the fields that changed and should not have to resend everything else.

Is POST always the right choice for writes?

No. POST is the most flexible verb, but that flexibility is also why it is overused. If the operation is clearly a replace, partial update, or delete, PUT, PATCH, or DELETE usually communicates the contract better.

Does DELETE always mean hard-delete the record?

No. DELETE means the target resource should no longer be available in that form. Internally you can soft-delete, archive, tombstone, or queue cleanup work as long as the external contract is clear.

Browse /search