You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I run some own code before server.serveStatic(); ?
I have a html file stored in LittleFS and serve it via httpServer.serveStatic("/action", LittleFS, "/action.html");
Now I want to execute some code first when someone requests /action and then send action.html , but I can't find no other way than to write a handler function that executes my code and then reads the file into a String fileBuffer and finally sending the String via httpServer.send(200, HTML, fileBuffer);
Does anybody has a hint for a better way of doing this?
I'using latest version of esp8266webserver on an wemos d1 mini with 4MB.