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
Have spent few hours trying to close() the server to begin () it again with new handlers but nothing works. I am adding handlers with server.on() Here is part of my code:
ESP8266WebServer server(80);
void setup() {
server.on("/def", HTTP_GET, {
server.send ( 200, "text/plain", "DefStillHere");
});
server.on("/test", HTTP_GET, {
server.send ( 200, "text/plain", "StillAlive");
});
server.begin();
}
SetMode("CONFIG_MODE");
void SetMode(String MODE) {
//works?
delay(200);
if( MODE=="CONFIG_MODE"){
//set variables
StartAP();
SetEndpoints();
}
server.begin();
}
P.S. just want to remove the handlers, so I wont have to check if they should be available.
The text was updated successfully, but these errors were encountered:
Have spent few hours trying to close() the server to begin () it again with new handlers but nothing works. I am adding handlers with server.on() Here is part of my code:
ESP8266WebServer server(80);
void setup() {
server.on("/def", HTTP_GET, {
server.send ( 200, "text/plain", "DefStillHere");
});
server.on("/test", HTTP_GET, {
server.send ( 200, "text/plain", "StillAlive");
});
server.begin();
}
SetMode("CONFIG_MODE");
void SetMode(String MODE) {
//works?
delay(200);
if( MODE=="CONFIG_MODE"){
//set variables
StartAP();
SetEndpoints();
}
server.begin();
}
P.S. just want to remove the handlers, so I wont have to check if they should be available.
The text was updated successfully, but these errors were encountered: