Re:Hijacking infrared to make a dumb device smart
by cassepipe on Thursday December 01, 2022 @06:52PM
(#33824823)
This has no bearing on the project but since I am implementing a toy server I am wondering about the choice of the PUT method. I thought that it was mostly unused (browser don't send PUT requests) and was replaced by POST request most of the time.
[ Parent
| on HN ]
Re:Hijacking infrared to make a dumb device smart
by ArchOversight on Thursday December 01, 2022 @07:30PM
(#33825157)
PUT can be used from XMLHttpRequest as well as fetch() and allows you to build a REST API using JavaScript.
Re:Hijacking infrared to make a dumb device smart
by jhugo on Thursday December 01, 2022 @10:18PM
(#33826328)
Browsers will happily send any standard HTTP method including PUT. HTML forms always produce a GET or POST [0], but nowadays most requests are probably made with fetch() etc, not HTML forms.
[0] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fo...