Safety and idempotency

A method is safe if it does not modify server state (GET, HEAD) and idempotent if repeating it gives the same final state (PUT, DELETE). POST is generally neither, which makes retrying after an error risky without precautions.

Example

Sending DELETE /commandes/17 twice leaves the same final state: the order is deleted.

Related concepts

The whole glossary