Repaso
Español
Backend & APIsIntermediateAPI-01

Which HTTP method is NOT idempotent by definition?

Options

  1. GET
  2. PUT
  3. DELETE
  4. POST (Correct option)

Answer

POST

Why

Idempotent means: sending the same request once or ten times leaves the server in the same final state.

GET only reads. PUT sets a resource to a given value (setting it twice changes nothing more). DELETE removes it (deleting twice: still deleted).

POST usually CREATES something: two identical POSTs to /orders can create two orders. That is why retrying a POST is risky.

Remember

POST creates → repeating it can create duplicates.

Key terms

Practice this question in Repaso