Merge pull request #4429 from Bmooij/feature/Add_flash_helper_constructor_to_Uri

Add flash helper constructor to Uri
This commit is contained in:
Me No Dev 2020-11-02 18:56:08 +02:00 committed by GitHub
commit d6b383f84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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!");
});

View File

@ -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 {