1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-09-09 18:40:33 +03:00

add ESP8266WebServer::send_P with contentLength argument

This commit is contained in:
Martin Ayotte
2015-09-06 14:17:23 -04:00
parent 1c9456ac9d
commit 27b67f4adc
2 changed files with 8 additions and 0 deletions

View File

@@ -169,6 +169,13 @@ void ESP8266WebServer::send_P(int code, PGM_P content_type, PGM_P content) {
sendContent_P(content);
}
void ESP8266WebServer::send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength) {
String header;
_prepareHeader(header, code, String(FPSTR(content_type)).c_str(), contentLength);
sendContent(header);
sendContent_P(content, contentLength);
}
void ESP8266WebServer::send(int code, char* content_type, const String& content) {
send(code, (const char*)content_type, content);
}