What makes a request idempotent, and which methods are?

REST API design and errors · Freshers and experienced

Model answer

An idempotent request has the same effect whether you send it once or many times. GET, PUT, DELETE and HEAD are idempotent. POST usually is not, since repeating it can create duplicates. This matters for retries after network failures. For payments and similar, use an idempotency key.

Learn this topic

Build a REST API: Create, Read, Update and Delete Tasks in the course Node.js and Express: Build a Back End API from Scratch.

Sign in to add your own answer.

More questions