diff --git a/libraries/WebServer/examples/PathArgServer/PathArgServer.ino b/libraries/WebServer/examples/PathArgServer/PathArgServer.ino index 6e120c3f..0b4dc425 100644 --- a/libraries/WebServer/examples/PathArgServer/PathArgServer.ino +++ b/libraries/WebServer/examples/PathArgServer/PathArgServer.ino @@ -32,7 +32,7 @@ void setup(void) { Serial.println("MDNS responder started"); } - server.on("/", []() { + server.on(F("/"), []() { server.send(200, "text/plain", "hello from esp32!"); }); diff --git a/libraries/WebServer/src/Uri.h b/libraries/WebServer/src/Uri.h index 83772b23..d924a0bd 100644 --- a/libraries/WebServer/src/Uri.h +++ b/libraries/WebServer/src/Uri.h @@ -12,6 +12,7 @@ class Uri { public: Uri(const char *uri) : _uri(uri) {} Uri(const String &uri) : _uri(uri) {} + Uri(const __FlashStringHelper *uri) : _uri(String(uri)) {} virtual ~Uri() {} virtual Uri* clone() const {