API Design · Middle · Question 18 of 75
How does an idempotency key work on the server?
- ✓Correct answer: The server stores the key with the request fingerprint and the response; repeats with the same key return the stored response instead of doing the work again
- 2The key encrypts the request
- 3The server rejects all requests that have a key
Explanation
Keys expire after some time. If the same key comes with a different body, return an error, since it's likely a client bug.