Back to problems

Idempotency API with Idempotency-Key Header

Object-Oriented Programming · Microsoft · Medium

Requirements Create a request handler with an interface approximately like this: The interviewer defines the following behavior: Initial request using key K runs the normal processing path, produces response R, and saves the association (K → R). A repeat request with identical K and body must return the saved R rather than run the operation again. A repeat request using K with a changed body must produce 409 Conflict (or a comparable error), because that key is now…

Checking your access…