Re:You know how HTTP GET requests are meant to be idempotent?
by thomasz on Tuesday May 01, 2018 @05:41AM
(#16965647)
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.
Re:You know how HTTP GET requests are meant to be idempotent?
by mpweiher on Tuesday May 01, 2018 @06:45AM
(#16965934)
> 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.
Get, and NOOP, are both "safe" and naturally "idempotent" since the former encompasses the latter.
[0] https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html