Why Hacker News recommends it
4 comments from 1 distinct recommending reader, between 2018 and 2024.
- Recommends
For a real world example of why idempotency is important and not just some random suggestion: twitter.com/rombulow/status/99068445373…
Volatile – A key-value pair APIRead the thread - Cites it
GET requests should be idempotent - browsers will call them without explicitly asking to, if bookmarked etc. Reminds me of the old story here twitter.com/rombulow/status/99068445373… Maybe consider changing setting the height to a POST request
Internet of Desks: How I Connected My Standing Desk to the InternetRead the thread - Cites it
This reminds me of the story of an internet connected garage door opener that uses GET for opening and closing > twitter.com/rombulow/status/99068445373…... TL;DR: Safari figures out the user is visiting this page very frequently so whenever Safari opens, it tries to send a request to fetch the garage door "page" link before he visits anywhere to cache the response. Which immediately opens the garage door.
The Wiki is in French (2011)Read the thread - Cites it
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] twitter.com/rombulow/status/99068445373… [2] news.ycombinator.com/item?id=16964907
Idempotence: What is it and why should I care?Read the thread