Skip to content

Library internally uses deprecated function beginResponse_P causing compile warnings on ESP8266 #489

Closed

Description

@pdfelen

Platform

ESP8266

IDE / Tooling

Arduino (IDE/CLI)

What happened?

In version 3.12.1 beginResponse_P has been depricated, however in ESPAsyncWebServer.h line 717 it internally still uses beginResponse_P causing compiler warnings:
c:.....\ESP_Async_WebServer\src/ESPAsyncWebServer.h:717:62: warning: 'AsyncWebServerResponse* AsyncWebServerRequest::beginResponse_P(int, const String&, const char*, AwsTemplateProcessor)' is deprecated: Replaced by beginResponse(int code, const String& contentType, const char* content = asyncsrv::empty, AwsTemplateProcessor callback = nullptr) [-Wdeprecated-declarations]

717 | send(beginResponse_P(code, contentType, content, callback));

  |                                                              ^

c:\Pepijn\Projecten\Elektronica\Source\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:777:27: note: declared here

777 | AsyncWebServerResponse *beginResponse_P(int code, const String &contentType, PGM_P content, AwsTemplateProcessor callback = nullptr);

  |                           ^~~~~~~~~~~~~~~

Replacing beginResponse_P on line 717 for beginResponse will make the warnings go away.

Stack Trace

No crash, compile warning for ESP8266

Minimal Reproductible Example (MRE)

Compile warning for ESP8266

I confirm that:

  • I have read the documentation.
  • I have searched for similar discussions.
  • I have searched for similar issues.
  • I have looked at the examples.
  • I have upgraded to the lasted version of ESPAsyncWebServer (and AsyncTCP for ESP32).

Activity

  1. added a commit that references this issue on Oct 11, 2026
  2. linked a pull request that will close this issueUpdate ESPAsyncWebServer.h #490on Oct 11, 2026
  3. mathieucarbou commented on Oct 11, 2026

    @mathieucarbou
    Member

    Hi,
    I suspect you are using 8266 code but compile / use it with esp32....

  4. locked and limited conversation to collaborators on Oct 11, 2026
  5. converted this issue into a discussion #491 on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions