What does idempotent mean in HTTP?
The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
- tool
- HTTP
- versions
- RFC 9110
- os
- any
A request method is idempotent when sending the same request several times leaves the server in the same state as sending it once (RFC 9110, section 9.2.2). That is what makes it safe for clients, proxies and libraries to retry it automatically after a timeout. The response may differ (a second DELETE can return 404); the effect on the resource does not.
Methods
| Method | Idempotent | Safe (read-only) |
|---|---|---|
| GET, HEAD, OPTIONS, TRACE | yes | yes |
| PUT | yes | no |
| DELETE | yes | no |
| POST | no | no |
| PATCH | not guaranteed | no |
Why it matters
- Retries: a client that gets no answer to a
PUTcan resend it; resending aPOSTmay create two orders or charge a card twice. - Idempotency keys: APIs that need safe retries for
POST(payments, order creation) accept anIdempotency-Keyheader and return the stored result for a repeated key. - Design: "set the price to 10" (
PUT) is idempotent; "add 10 to the price" is not, whatever method carries it.
Sources
Related pages
codes · httpHTTP status codes: 1xx to 5xx with meaning and common causesHTTP status codes explained: 200 and 204, the redirects 301 to 308, client errors 400 to 429 and server errors 500 to 504, each with its most common cause.changes · oauth2OAuth 2.0 to OAuth 2.1: what changesOAuth 2.1 (draft-ietf-oauth-v2-1-16) requires PKCE, exact redirect URI matching and no tokens in query strings, and drops the implicit and password grants.errors · dnsError: getaddrinfo ENOTFOUND (DNS lookup failed)Node.js throws getaddrinfo ENOTFOUND when DNS cannot resolve the host: a typo, a full URL passed as host, a name only in /etc/hosts, or no working DNS.