Using PUT requests
Posted: Sat Apr 27, 2019 8:23 am
Hi all,
I am developing light controller using an ESP32 in Arduino (I am using the Platform IO IDE).
My controller serves a web page including some javascript that attaches to the the 'oninput' method of a Slider (range) control. This javascript sends HTTP PUT requests back to the ESP32 to change the intensity of LED on any change of the slider (range) control.
This all works well, however I can see that there are some issues when I look in the Chrome Debug Console. I can see that some of the PUT requests aren't getting a return and eventually timeout. Whist this isn't a major issue, if you move the slider fast enough, you can easily outstrip the ability of the system to return a response and you may end up with a value that wasn't the last value 'slid' to.
My basic questions is: Am I doing this in the wrong way ... HTTP Requests are cumbersome and time consuming at a network level. Should i be using some more direct method such as UDP. If so, can I send this from a HTML/CSS/Javascript webpage?
Thanks for your time
Regards
Mike
I am developing light controller using an ESP32 in Arduino (I am using the Platform IO IDE).
My controller serves a web page including some javascript that attaches to the the 'oninput' method of a Slider (range) control. This javascript sends HTTP PUT requests back to the ESP32 to change the intensity of LED on any change of the slider (range) control.
This all works well, however I can see that there are some issues when I look in the Chrome Debug Console. I can see that some of the PUT requests aren't getting a return and eventually timeout. Whist this isn't a major issue, if you move the slider fast enough, you can easily outstrip the ability of the system to return a response and you may end up with a value that wasn't the last value 'slid' to.
My basic questions is: Am I doing this in the wrong way ... HTTP Requests are cumbersome and time consuming at a network level. Should i be using some more direct method such as UDP. If so, can I send this from a HTML/CSS/Javascript webpage?
Thanks for your time
Regards
Mike