Skip to content

Commit aa0bc33

Browse files
earlephilhowerd-a-v
authored andcommitted
Add plain char* signatures WebServer::sendContent (#6341)
Fixes #2567 Allow the web server to send plain C strings instead of requring they be encapsulated inside a String class object. Saves memory vs. having to convert C strings to Strings (i.e. duplication of data), overloads on the efficient sendContent_P(char*) methods.
1 parent 34077c0 commit aa0bc33

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/ESP8266WebServer/src/ESP8266WebServer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ class ESP8266WebServerTemplate
135135
void sendContent(const String& content);
136136
void sendContent_P(PGM_P content);
137137
void sendContent_P(PGM_P content, size_t size);
138+
void sendContent(const char *content) { sendContent_P(content); }
139+
void sendContent(const char *content, size_t size) { sendContent_P(content, size); }
138140

139141
static String credentialHash(const String& username, const String& realm, const String& password);
140142

0 commit comments

Comments
 (0)