16 ms·
https://threadreaderapp.com/thread/990684453734203392.html https://threadreaderapp.com/thread/990684453734203392.html Had a GET request that would open or clos
by bombcar 3y ago
https://threadreaderapp.com/thread/990684453734203392.html https://threadreaderapp.com/thread/990684453734203392.html
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.
- Filligree 3y agoAh, I see... 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.)
- bombcar 3y agoYeah I think people are saying "GET shouldn't change state" and using idempotent incorrectly (which is more "hitting this multiple times shouldn't change things more than once").