Updated the OTAUpdater class which uses the HttpClient to make use of the introduced enum

This commit is contained in:
anschrammh 2025-11-04 21:38:37 +01:00
parent 9d4edfc0f0
commit d9cb8bf6bc

View File

@ -127,7 +127,7 @@ OTAUpdater::UpdateInfo OTAUpdater::fetchUpdateInfo(const char *softwareVersion,
headerData.add("x-ESP8266-STA-MAC",DictionaryHelper::StringEntity(WiFi.macAddress().c_str())); headerData.add("x-ESP8266-STA-MAC",DictionaryHelper::StringEntity(WiFi.macAddress().c_str()));
headerData.add("User-Agent",DictionaryHelper::StringEntity("ESP8266-http-Update")); headerData.add("User-Agent",DictionaryHelper::StringEntity("ESP8266-http-Update"));
if(httpClient.sendHttpQuery(HttpClient::HttpRequestMethod::GET, &getData, NULL, &headerData) == 0) if(httpClient.sendHttpQuery(HttpClient::HttpRequestMethod::GET, &getData, NULL, &headerData) == HttpClient::HttpQueryStatus::SUCCESS)
{ {
HttpConstants::HTTP_CODE result = httpClient.isReplyAvailable(1000); HttpConstants::HTTP_CODE result = httpClient.isReplyAvailable(1000);
switch(result) switch(result)