3 ms·
There's nothing stopping GET requests from having side effects. It's like pointing to a list of best practices and saying "everyone surely follows these." For
by hombre_fatal 8y ago
There's nothing stopping GET requests from having side effects.
It's like pointing to a list of best practices and saying "everyone surely follows these."
For example, someone changed their signature to `[img]/logout.php[/img]` on a forum I posted on as a kid and caused chaos. The mods couldn't remove it because, on the page that lets you modify a user's signature, it shows a signature preview. Good times.
- arendtio 8y agoI think it was a joke as GET requests are not supposed to change anything, but often they do (probably because many devs don't know about, understand or respect the RESTful concept). EDIT: For completeness, I have to add, that I am also part of the group of people who have violated that concept. Maybe neither frequently nor recently, but I did it too :-/
- chrisseaton 8y ago> understand or respect the RESTful concept It's nothing to do with REST. It's part of the HTTP spec and has always been, that "GET and HEAD methods should never have the significance of taking an action other than retrieval".
- arendtio 8y agoWell, if I am not mistaken, REST is just the articulated concept on which HTTP was built. So yes, the HTTP spec (probably) existed before REST became a term itself, but in the end, there is no reason to argue if REST defines it or HTTP.
- chrisseaton 8y ago> There's nothing stopping GET requests from having side effects. > It's like pointing to a list of best practices and saying "everyone surely follows these." It’s not a ‘best practice’ it’s literally the spec for the web.
- hombre_fatal 8y agoWhat percent of developers do you think have even read the RFC? Browsers take a more practical approach than "well, it's in the spec, they should know better" which is apparently what you're suggesting. It's the same reason browsers will do their best to render completely ridiculous (much less spec-complaint) HTML.
- lixtra 8y agoTo prove your point: If I remember correctly HN votes are sent as GET.