|
|
|
|
|
by SebRollen
957 days ago
|
|
EDIT: My reply below is wrong - you _can_ deal with in-flight requests with E-Tags as well using the if-match header. I had only seen them used with if-none-match. TIL. E-Tags would probably not help here, because the client won't have a tag to send along with its request until after the original response returns. But the thing we're trying to prevent in the first place is multiple concurrent requests being processed. The Idempotency-Key header[1] is probably a better fit, but that relies on the server implementing the spec, including properly dealing with multiple in-flight requests with the same header. I found this blog post[2] pretty good for exploring some of the implementation challenges. [1]: https://www.ietf.org/archive/id/draft-ietf-httpapi-idempoten.... [2]: http://live.julik.nl/2021/12/actually-creating-a-gem-for-ide... |
|