Skip to content

Commit d6b383f

Browse files
authored
Merge pull request #4429 from Bmooij/feature/Add_flash_helper_constructor_to_Uri
Add flash helper constructor to Uri
2 parents cadbad8 + ae240a3 commit d6b383f

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)