Community Article
Community articles are authored by SitePoint Premium contributors. Content is screened before publication, and SitePoint reserves the right to moderate or remove articles that violate our guidelines. Views expressed are those of the authors and do not necessarily reflect those of SitePoint.
The AI briefing for Developers
Stay up to date with AI tools, model releases, and developer workflows that matter.
Weekly. Free. One click to leave.
A mobile app sends POST /orders . The server creates the order, but the response is lost when the phone switches from Wi-Fi to 4G. The app sees a timeout and retries. Now the customer has two orders, and your support team has a refund to process.
Retrying is the right thing for a client to do. The problem is that POST is not idempotent: RFC 9110 defines GET , PUT and DELETE as idempotent methods, but not POST or PATCH . Repeating a POST can repeat its side effects.
An idempotency key fixes this.…