Fixed a bug that caused a compilation error with esp-idf v4.4

This commit is contained in:
nopnop2002
2023-01-10 05:38:03 +09:00
parent e9837410d6
commit 0d070f8e75
+2
View File
@@ -92,11 +92,13 @@ esp_err_t _http_event_handler(esp_http_client_event_t *evt)
ESP_LOGI(TAG, "Last mbedtls failure: 0x%x", mbedtls_err);
}
break;
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
case HTTP_EVENT_REDIRECT:
ESP_LOGD(TAG, "HTTP_EVENT_REDIRECT");
esp_http_client_set_header(evt->client, "From", "user@example.com");
esp_http_client_set_header(evt->client, "Accept", "text/html");
break;
#endif
}
return ESP_OK;
}