2 ms·
In the context of REST it means the same server state (a database table state, a mailbox state, file system state etc) It doesn’t mean “do the same thing” or “
by alkonaut 7y ago
In the context of REST it means the same server state (a database table state, a mailbox state, file system state etc)
It doesn’t mean “do the same thing” or “get the same response”, only “end up in the same place”.
You can do a delete x, get an OK response, and the important state is that x is now deleted on the server. Then the next call to delete x does nothing (which is different from the first which deleted x!). So to be idempotent it has to do something different. The response in the second case can be both “ok” (because the thing is deleted) but also e.g “x doesn’t exist”.