Updated the OTAUpdater class which uses the HttpClient to make use of the introduced enum
This commit is contained in:
parent
9d4edfc0f0
commit
d9cb8bf6bc
@ -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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user