What does 'idempotency' mean for HTTP methods, and which standard methods are defined as idempotent by RFC 9110?
- A.Idempotent means multiple identical requests return the same response body as a single request. RFC 9110 defines as idempotent: GET, HEAD, PUT, POST, OPTIONS, TRACE, so retries are safe for most verbs; DELETE and PATCH are the unsafe retries, and a repeated DELETE might return 404 on the second call because the record is gone from the store of the origin server after the first call
- B.An idempotent method leaves the cache in the same state after multiple identical requests as after a single request. RFC 9110 defines as idempotent: GET, HEAD, OPTIONS, TRACE, CONNECT, and POST with an idempotency key, so servers may deduplicate retries; PUT and DELETE are not inherently idempotent because they modify stored data on the origin server for each client request
- C.Idempotent means a request can be repeated after a timeout without an error from the server. RFC 9110 defines as idempotent: GET, HEAD, POST, and TRACE, but PUT might not be, because it replaces the stored data on each call with the full body of the request