- Mon Jul 09, 2018 2:36 am
OK. I can see you are doing your own server parsing in listen. Lack of response is going to be either a problem in listen itself or that listen is not called often enough.
I am not sure why you have chosen this route to the server side handling. It seems a bit complex and complexity leads to behaviour more difficult to understand.
The method used in many cases for server side handling is to define server.on handlers in setup and then just call server.handleClient regularly within the loop. This will automatically call the requisite handlers when GET or POST requests are received. One can also have a catch all server.onNotFound to handle requests not catered for in other server.on
server.on(("/Weather", handleWeatherData); in setup
server.handleClient(); in loop
will call the void handleWeatherData function when a request to /Weather is made. This function can end up just doing a
server.send(200, "text/html", response);
Any number of server.on can be put into setup which then modularises the code quite effectively.