https://twitter.com/rombulow/status/990684453734203392
Maybe consider changing setting the height to a POST request
https://twitter.com/rombulow/status/990684453734203392
Maybe consider changing setting the height to a POST request
* I just didn't want to mess about with postman or curl or whatever in order to test, much easier to just issue a get request by visiting a url in the browser
* I'm going to be ripping the HTTP support out shortly and replacing it with MQTT support so it can more cleanly integrate with my HomeAssistant setup. The HTTP stuff was mostly just the fastest way I could get something approximating what I was looking for.
I definitely agree though, this being a `GET` request is offensive :P
To be clear I'm just talking about the web interface, not implying the whole project is throwaway - on the contrary it looks like a lot of work (and a lot of fun :) ) kudos!
Thanks for the post though, a fun read!
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.