You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-ietf-httpapi-idempotency-key-header.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ In mathematics and computer science, an idempotent operation is one that can be
45
45
46
46
Idempotency is important in building fault-tolerant HTTP APIs. An HTTP request method is considered `idempotent` if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request. Per {{!RFC9110}}, the methods `OPTIONS`, `HEAD`, `GET`, `PUT` and `DELETE` are idempotent while methods `POST` and `PATCH` are not.
47
47
48
-
Let's say a client of an HTTP API wants to create (or update) a resource using a `POST` method. Repeating the request multiple times can result in duplication or incorrect updates. Consider a scenario where the client sent a `POST` request to the server, but the request timed out. The client is left uncertain about the status of the resource. It doesn't know if the resource was created or updated, or if the server even completed processing the request. Furthermore, the client does not know if it can safely retry the request.
48
+
Let's say a client of an HTTP API wants to create (or update) a resource using a `POST` method. Repeating the request multiple times can result in duplication or incorrect updates. Consider a scenario where the client sent a `POST` request to the server, but the request timed out. The client is left uncertain about the status of the resource. It doesn't know if the resource was created or updated, or if the server even completed processing the request. Furthermore, the client does not know if it can safely retry the request.
49
49
50
50
51
51
## Notational Conventions
@@ -54,15 +54,15 @@ Let's say a client of an HTTP API wants to create (or update) a resource using a
54
54
55
55
This specification uses the Augmented Backus-Naur Form (ABNF) notation of {{!RFC5234}} and includes, by reference, the IMF-fixdate rule as defined in Section 7.1.1.1 of {{!RFC7231}}.
56
56
57
-
The term "resource" is to be interpreted as defined in Section 2 of {{!RFC7231}}, that is identified by an URI.
57
+
The term "resource" is to be interpreted as defined in Section 2 of {{!RFC7231}}, that is identified by an URI.
58
58
59
59
# The Idempotency-Key HTTP Request Header Field
60
60
61
61
An idempotency key is a unique value generated by the client which the resource uses to recognize subsequent retries of the same request. The `Idempotency-Key` HTTP request header field carries this value.
62
62
63
63
## Syntax
64
64
65
-
`Idempotency-Key`is an Item Structured Header {{!RFC8941}}. Its value MUST be a String (Section 3.3.3 of {{!RFC8941}}).
65
+
`Idempotency-Key`is an Item Structured Header {{!RFC8941}}. Its value MUST be a String (Section 3.3.3 of {{!RFC8941}}).
66
66
67
67
68
68
## Uniqueness of Idempotency Key
@@ -359,9 +359,14 @@ Second example shows an idempotency-key header field with key value using a rand
0 commit comments