Hacker News new | past | comments | ask | show | jobs | submit login

HTTP PUT is for idempotent operations, and would be appropriate here.



HTTP GET is also idempotent in REST, and slightly easier than PUT (since you can just append any parameters onto the end of the URL with GET instead of inserting them into the HTTP headers with PUT)


I believe HTTP GET is "nullipotent", meaning that accessing a resource 0 times is supposed to be the same as accessing it once or more. So I don't think it's appropriate for actions like "lights on".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: