Hacker News new | past | comments | ask | show | jobs | submit login

POST is explicitly not idempotent.



...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.


POST isn't required to be idempotent, but to be clear it's not improper to make an API with idempotent POST endpoints.


Which is exactly why it's a fairly unusual choice for an example.


It 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: