FF145 Idempotency-Key HTTP header #28219
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FF145 adds support for the
Idempotency-Key
header in https://bugzilla.mozilla.org/show_bug.cgi?id=1991641This has a spec https://datatracker.ietf.org/doc/draft-ietf-httpapi-idempotency-key-header/ but adding it results in an error. Can you remind me how to get an exception?
The key is sent in requests to indicate that a POST/PATCH is a particular unique command. If the server gets the same request with the same key it ignores it.
As specified the server defines the requirements for the key, which would be expected therefore to be unknown to the browser, and set by Javascript.
As such you wouldn't expect a browser integration, and hence no BCD entry.
However FF automatically attaches a key if one is not attached. As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1991641#c6 this is probably because the server doesn't really need to care what the key does. This then is the reason to indicate integration.
Related docs work can be tracked in mdn/content#41497