Understanding handleRoot() ESp8266 Serbver
Posted: Mon Aug 08, 2022 2:02 pm
Hi - I am using a D1 - esp8266 to do a simple led on/off and am experimenting with sending text and html to a webpage.
In the handleRoot() function:
I have:
But I only see the first line in the browser when handleRoot gets called.
If I comment out the first line then the second line gets sent.
What am I not understanding?
thanks
Russell
In the handleRoot() function:
I have:
Code: Select all
void handleRoot() {
server.send(200, "text/plain", "hello from esp8266! (blinking LED!)"); // first line
server.send(200, "text/plain", "Further text..."); //second line
}
But I only see the first line in the browser when handleRoot gets called.
If I comment out the first line then the second line gets sent.
What am I not understanding?
thanks
Russell