4 ms·
HTTP PUT is for idempotent operations, and would be appropriate here.
by howinteresting 5y ago
HTTP PUT is for idempotent operations, and would be appropriate here.
- deleted 5y ago[deleted]
- mmerlin 5y agoHTTP 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)
- howinteresting 5y agoI 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".