2 ms·
I don’t get it. For a particular request, a server must implement its documented idempotency guarantee, and the client needs to understand the server’s guarant
by jmull 5y ago
I don’t get it.
For a particular request, a server must implement its documented idempotency guarantee, and the client needs to understand the server’s guarantee to know whether it’s safe to retry.
How does this header help or change anything?
It’s only real use (that I see, please correct my misunderstanding if there is one) is to paper over an incorrect API design, where you want idempotent behavior but can have identical payloads for distinct requests.
(e.g., imagine a chat app, where the message being sent is the POST request body, and there’s no other metadata about the message. In that case, there’s no way to distinguish a new “you up?” message from a retry. However, such an API should simply have a message id value sent with each message.)