Comment by rusk
7 years ago
I'd just like to clarify that what you have described here is "safe" rather than "idempotent" [0]. Easy mistake to make, made the same mistake myself, idempotently (that is to say you only make it once ;)
Get, and NOOP, are both "safe" and naturally "idempotent" since the former encompasses the latter.
GET must be safe and idempodent. In the context of http, idempodency basically means that you get the same result for each request with the same url and the same set of parameters.
Toggle should be implemented as post, since it’s neither safe, nor idempodent.
> get the same result for each request with the same url and the same set of parameters.
I think the resource can change externally...so it means that your GET request doesn't change it, but it doesn't have to be the same result every time.
No not the same result. How would the front page of any news site work then?
yes