Tech
A practical, “ship-it” guide to idempotency keys, request hashing, persistence, PUT semantics, and de-dup in handlers/queues on .NET + Azure
API layer pattern (HTTP)
1) Contract
Require Idempotency-Key on POST that creates resources (optional on GET, safe methods).
For PUT / PATCH , prefer natural keys (resource URI) + concurrency (ETag) over custom keys.
Return Idempotency-Replayed: true on replays.
2) What to persist
(TenantId, IdempotencyKey) — unique .
Request fingerprint (stable hash of method + path + canonicalized body).
First status code , headers (whitelisted), ...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to