News for hackers. Stuff that matters.
Re:Internet of Desks: How I Connected My Standing Desk to th... by Filligree on Monday April 22, 2024 @10:32AM (#40114767)
> This, kids, is why GET requests should be idempotent.

I'm not sure I understand. What is this referring to?

Re:Internet of Desks: How I Connected My Standing Desk to th... by bombcar on Monday April 22, 2024 @10:55AM (#40115008)
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.

Re:Internet of Desks: How I Connected My Standing Desk to th... by Filligree on Monday April 22, 2024 @11:04AM (#40115105)
Ah, 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.)

Re:Internet of Desks: How I Connected My Standing Desk to th... by bombcar on Monday April 22, 2024 @11:50AM (#40115510)
Yeah 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").
Re:Internet of Desks: How I Connected My Standing Desk to th... by ApeTheRick on Monday April 22, 2024 @10:33AM (#40114776)
I think the twitter link is messed up, I have to scroll up to see the whole thread.

Edit: Fixed the link now.

Re:Internet of Desks: How I Connected My Standing Desk to th... by tjoff on Monday April 22, 2024 @12:10PM (#40115702)
Twitter threads are always messed up if you don't have an account. You can't follow the thread at all.