I noted that the WebServer.h library offers a nice callback function that you can use when a client request files
Code: Select all
server.on("/", handleRoot);
The thing I cannot figure out how to do, is to use this WebServer library, or at least it's underlying request parser to handle a WifiClient. I know how to read and write bytes from and to a wifi client, but I feel it wouldn't be smart to write a http request parser given that WebServer library already has one.
All the Arduino esp32 examples either use the wifiClient alone, or the webserver alone (needing an external router). I want to make something like the captive portal example, but be able to parse the http request (path, get vars, etc.) and send different text/html contents accordingly.