Fix method overload issue with ESP8266. ESP8266 has to use send_P() and beginResponse_p() variants

This commit is contained in:
Mathieu Carbou
2024-09-14 12:53:18 +02:00
parent fa20cdf7a3
commit f959bb91dd
2 changed files with 17 additions and 23 deletions

View File

@@ -712,11 +712,9 @@ AsyncResponseStream* AsyncWebServerRequest::beginResponseStream(const char* cont
return new AsyncResponseStream(contentType, bufferSize);
}
#ifdef ESP8266
AsyncWebServerResponse* AsyncWebServerRequest::beginResponse(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback) {
AsyncWebServerResponse* AsyncWebServerRequest::beginResponse_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback) {
return new AsyncProgmemResponse(code, contentType, (const uint8_t*)content, strlen_P(content), callback);
}
#endif
void AsyncWebServerRequest::send(AsyncWebServerResponse* response) {
if (_sent)