4 ms·
There was a story about toggles in apis on HN a few months ago [1][2], basically the toggle function was called for the garage door, which is clearly not idempo
by drawkbox 8y ago
There was a story about toggles in apis on HN a few months ago [1][2], basically the toggle function was called for the garage door, which is clearly not idempotent, rather than an action like open/close so that is wasn't repeated. The toggle action led to opening and closing of the door repeatedly. Non idempotent requests are especially bad when tied to real physical machinery.
[1] https://twitter.com/rombulow/status/990684453734203392 https://twitter.com/rombulow/status/990684453734203392
[2] https://news.ycombinator.com/item?id=16964907 https://news.ycombinator.com/item?id=16964907