2 ms·
PUT is supposed to be idempotent? So an "increment" or "reverse" request should technically be a POST? Or does the idempoten-cy apply only to the response from
by jon_dahl 18y ago
PUT is supposed to be idempotent? So an "increment" or "reverse" request should technically be a POST?
Or does the idempoten-cy apply only to the response from the server, and not the state of the data on the server?
- pmjordan 18y agoThat's certainly my understanding of it. PUT has semantics of resource creation or updating, like writing a file: whatever you upload replaces what is already there, if anything. You can process the data of course, but the outcome should depend only on the request data itself, not state.
- cperciva 18y agoPUT is supposed to be idempotent? So an "increment" or "reverse" request should technically be a POST? Absolutely. User-agents are allowed to retry PUTs transparently -- it's only for POSTs that they're supposed to put up a "are you sure you want to re-submit this form? Bad stuff might happen" dialog.