News for hackers. Stuff that matters.
Re:You know how HTTP GET requests are meant to be idempotent? by rusk on Tuesday May 01, 2018 @04:31AM (#16965402)
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.

[0] https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

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.

Re:You know how HTTP GET requests are meant to be idempotent? by dalore on Tuesday May 01, 2018 @08:38AM (#16966493)
No not the same result. How would the front page of any news site work then?
Re:You know how HTTP GET requests are meant to be idempotent? by rusk on Tuesday May 01, 2018 @05:48AM (#16965675)
yes