Post topics, source code that relate to the Arduino Platform

User avatar
By insense
#46460 Hi!

@katz: Thank you for great example!

I have some questions...

How to serve .html page (~3KB) from file? I have entire page in one string, but it's very ugly to see. Is there any example how to store .html file in flash and then send it when you get request?

Also, I can't find API for ESP8266WebServer.

Thanks!
User avatar
By martinayotte
#46491 For the API, look at the source https://github.com/esp8266/Arduino/blob ... ebServer.h

For defining a big HTML chunk into a variable, you can use this C++ syntax (everything between parenthesis can be plain un-escaped HTML) :

Code: Select allconst char html_page[] PROGMEM = R"=====(
html><head></head><body>
</body></html>
)=====";