mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-25 20:02:37 +03:00
Add flash helper constructor to Uri (#7105)
* Update Uri.h * Add a simple test for the new constructor Convert a c-str to a FPSTR in the example to have a section of code in our CI that will catch any future breaks of this specific kind. Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
This commit is contained in:
parent
d990ff9547
commit
2b640c0189
@ -37,7 +37,7 @@ void setup(void) {
|
||||
Serial.println("MDNS responder started");
|
||||
}
|
||||
|
||||
server.on("/", []() {
|
||||
server.on(F("/"), []() {
|
||||
server.send(200, "text/plain", "hello from esp8266!");
|
||||
});
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user