Skip to content

Commit ae240a3

Browse files
Add flash helper constructor to Uri
1 parent 1287c52 commit ae240a3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: libraries/WebServer/examples/PathArgServer/PathArgServer.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void setup(void) {
3232
Serial.println("MDNS responder started");
3333
}
3434

35-
server.on("/", []() {
35+
server.on(F("/"), []() {
3636
server.send(200, "text/plain", "hello from esp32!");
3737
});
3838

Diff for: libraries/WebServer/src/Uri.h

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Uri {
1212
public:
1313
Uri(const char *uri) : _uri(uri) {}
1414
Uri(const String &uri) : _uri(uri) {}
15+
Uri(const __FlashStringHelper *uri) : _uri(String(uri)) {}
1516
virtual ~Uri() {}
1617

1718
virtual Uri* clone() const {

0 commit comments

Comments
 (0)