esp8266webserver question: How to run some own code before server.serveStatic();
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.