3 ms·
This is pretty much the classic newbie web developer mistake, heard many stories about people making it when they first start. I've also seen people fuck up in
by astura 9y ago
This is pretty much the classic newbie web developer mistake, heard many stories about people making it when they first start. I've also seen people fuck up in the opposite way, using POST when they should use GET and having unexpected behavior. Though not usually as "funny" as the classic "using GET instead of POST" errors are.
This concept of HTTP request methods really should be explained to new developers in a more accessible way, with examples of mistakes. It might not be intuitive at first or they might not think it's important as it is.
"Idempotence" isn't really the problem here, nor "should" GET requests be idempotent, think kittenwar.com or stumbleupon, the problem here is GET is reserved for retrieving (getting!) data, it shouldn't modify data. (Other than access information.)
- phab 9y agoGET requests are specified[0] to be idempotent: > Methods can also have the property of "idempotence" in that (aside from > error or expiration issues) the side-effects of N > 0 identical > requests is the same as for a single request. The methods GET, HEAD, > PUT and DELETE share this property. [0] https://tools.ietf.org/html/rfc2616#section-9.1.2 https://tools.ietf.org/html/rfc2616#section-9.1.2 edit: formatting
- astura 9y agoLooks like the RFC talks about idempotence from a "side effect" perspective where I was talking about it from an "output" perspective (the generated HTML). I agree with the RFC and I mistook what the person meant
- hatsunearu 9y agoWhat are some of these unexpected behaviors associated with using POST when you're meant to use GET?