> This, kids, is why GET requests should be idempotent.
I'm not sure I understand. What is this referring to?
I'm not sure I understand. What is this referring to?
Had a GET request that would open or close the garage door.
Safari learned he liked that page, and would hit it every time he opened a new tab on any device.
POST requests should be idempotent, ideally. PUT requests certainly must be; it's their defining characteristic. GET requests, though, just shouldn't have side-effects at all.
(A /toggle URL isn't idempotent. If it were /open and /close it would be, but still shouldn't be GET.)
Edit: Fixed the link now.