Fix ESP32 USE_WEBCLIENT_HTTPS WebQuery HTTPS redirect response (#24662)

This commit is contained in:
Theo Arends
2026-04-21 18:09:57 +02:00
parent 3cf42ba8d8
commit 39b34c6e0c
@@ -4152,6 +4152,7 @@ int WebQuery(char *buffer, int query_function = 0) {
if (url) {
#if defined(ESP32) && defined(USE_WEBCLIENT_HTTPS)
if (http.begin(UrlEncode(url))) {
http.setFollowRedirects(HTTPC_FORCE_FOLLOW_REDIRECTS); // Follow redirects (e.g. Google Apps Script exec URLs redirect 302 -> 200)
#else // HTTP only
if (http.begin(http_client, UrlEncode(url))) {
#endif