safe method
An HTTP method, such as GET or HEAD, whose request is not meant to change anything on the server.
In more detail
Because a safe request has no intended effect, browsers, crawlers, caches and proxies may send or repeat it freely, and it is always reasonable to retry. Every safe method is also idempotent, but not the other way round: PUT and DELETE change things yet are idempotent.
Related terms
- idempotency — The property of an operation that gives the same result whether you run it once or many times, because a repeat run finds nothing left to do.
- HTTP method — The verb at the start of a web request that says what the client wants, such as GET to read or POST to create.
- retry — Sending a request again after it failed or timed out, in the hope that it succeeds the second time.
Taught in
- HTTP Methods And Status Codes — Modern API Architecture: REST, GraphQL & gRPC
- Error Handling And Safe Retries — Modern API Architecture: REST, GraphQL & gRPC