marcoschwartz / aREST

A RESTful environment for Arduino
http://aREST.io/
Other
1.2k stars 279 forks source link

How to force send a HTTP 200 command in a rest.function #309

Open ralbright-wa opened 1 year ago

ralbright-wa commented 1 year ago

I am likely aRest and it is working quite well. However one of my main gripes is that there is a general lack of ability to send HTTP codes back to the requesting client. (Code 200 for example), so if you have a function that takes time to run (opening a drawer via an actuator, for example). The browser used when calling for testing or what ever you use, shows a spinning processing circle until it has completely finished the function.

This also produces undesirable results when you send a reset command (void(* resetFunc) (void) = 0; //declare reset function @ address 0) I can activate this via a rest function, but the browser times out after 30 seconds or so, and then I get timeout problems in my log. How can I get it to send a HTTP 200 code early?