[GH-ISSUE #1713] Add support for simultaneo use whit ESPAsyncWebServer.h #1450

Closed
opened 2026-02-28 01:30:07 +03:00 by kerem · 4 comments
Owner

Originally created by @AnthonyAC23 on GitHub (Feb 17, 2024).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1713

when you want to use ESPAsyncWebServer.h simultaneously with this library since using both at the same time generates errors due to redeclarations, etc.

please add this extension. thanks

some debug messages.

/http_parser.h:95:6: error: redeclaration of 'HTTP_DELETE'
XX(0,  DELETE,      DELETE)       \
/http_parser.h:138:45: note: in definition of macro 'XX'
#define XX(num, name, string) HTTP_##name = num,
/http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP'
HTTP_METHOD_MAP(XX)
ESPAsyncWebServer.h:66:3: note: previous declaration 'WebRequestMethod HTTP_DELETE'
HTTP_DELETE  = 0b00000100,
/http_parser.h:96:6: error: redeclaration of 'HTTP_GET'
XX(1,  GET,         GET)          \
/http_parser.h:138:45: note: in definition of macro 'XX'
#define XX(num, name, string) HTTP_##name = num,
/http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP'
HTTP_METHOD_MAP(XX)
/ESPAsyncWebServer.h:64:3: note: previous declaration 'WebRequestMethod HTTP_GET'
HTTP_GET     = 0b00000001,
/http_parser.h:97:6: error: redeclaration of 'HTTP_HEAD'
XX(2,  HEAD,        HEAD)         \
/http_parser.h:138:45: note: in definition of macro 'XX'
#define XX(num, name, string) HTTP_##name = num,
/http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP'
HTTP_METHOD_MAP(XX)

etc......

Originally created by @AnthonyAC23 on GitHub (Feb 17, 2024). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1713 when you want to use ESPAsyncWebServer.h simultaneously with this library since using both at the same time generates errors due to redeclarations, etc. please add this extension. thanks some debug messages. ```php /http_parser.h:95:6: error: redeclaration of 'HTTP_DELETE' XX(0, DELETE, DELETE) \ /http_parser.h:138:45: note: in definition of macro 'XX' #define XX(num, name, string) HTTP_##name = num, /http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP' HTTP_METHOD_MAP(XX) ESPAsyncWebServer.h:66:3: note: previous declaration 'WebRequestMethod HTTP_DELETE' HTTP_DELETE = 0b00000100, /http_parser.h:96:6: error: redeclaration of 'HTTP_GET' XX(1, GET, GET) \ /http_parser.h:138:45: note: in definition of macro 'XX' #define XX(num, name, string) HTTP_##name = num, /http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP' HTTP_METHOD_MAP(XX) /ESPAsyncWebServer.h:64:3: note: previous declaration 'WebRequestMethod HTTP_GET' HTTP_GET = 0b00000001, /http_parser.h:97:6: error: redeclaration of 'HTTP_HEAD' XX(2, HEAD, HEAD) \ /http_parser.h:138:45: note: in definition of macro 'XX' #define XX(num, name, string) HTTP_##name = num, /http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP' HTTP_METHOD_MAP(XX) ``` etc......
kerem closed this issue 2026-02-28 01:30:07 +03:00
Author
Owner

@tablatronix commented on GitHub (Feb 17, 2024):

How to avoid this in dependancy libs? Also there is a esp port issue with running 2 services

<!-- gh-comment-id:1949637962 --> @tablatronix commented on GitHub (Feb 17, 2024): How to avoid this in dependancy libs? Also there is a esp port issue with running 2 services
Author
Owner

@lucaoliano commented on GitHub (Mar 9, 2024):

As workaround in the file where you include ESPAsyncwebServer.h you must include WebServer.h first like below

#include <WebServer.h>
#include <ESPAsyncwebServer.h>
<!-- gh-comment-id:1986811139 --> @lucaoliano commented on GitHub (Mar 9, 2024): As workaround in the file where you include ESPAsyncwebServer.h you must include WebServer.h first like below ``` #include <WebServer.h> #include <ESPAsyncwebServer.h> ```
Author
Owner

@AnthonyAC23 commented on GitHub (Mar 9, 2024):

Tanks @lucaoliano, just like you said, that solved the problem.

<!-- gh-comment-id:1986881471 --> @AnthonyAC23 commented on GitHub (Mar 9, 2024): Tanks @lucaoliano, just like you said, that solved the problem.
Author
Owner

@AnthonyAC23 commented on GitHub (Mar 9, 2024):

Works!

<!-- gh-comment-id:1986881639 --> @AnthonyAC23 commented on GitHub (Mar 9, 2024): Works!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1450
No description provided.