3 ms·
POST is explicitly not idempotent.
by paulddraper 7y ago
POST is explicitly not idempotent.
- AgentME 7y agoPOST isn't required to be idempotent, but to be clear it's not improper to make an API with idempotent POST endpoints.
- Glyptodon 7y agoWhich is exactly why it's a fairly unusual choice for an example.
- AgentME 7y agoIt would be weird if he used a method like GET which is normally idempotent. People already make those be idempotent, so they would miss that the point is that a good API has all idempotent endpoints, POST and not.
- Glyptodon 7y ago...and the given example of something that should be idempotent is posting to create a new VM instance. Which you certainly may do. It's just a funny choice of example since that's the one example where the behavior he describes is potentially expected.