mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Passing custom HTTPClient to HTTPUpdate (#8773)
This enables passing additional headers to HTTP query. Based on ESP32 HTTPUpdate functionalities.
This commit is contained in:
parent
7cfb551f90
commit
3f394616a6
@ -83,6 +83,16 @@ HTTPUpdateResult ESP8266HTTPUpdate::update(WiFiClient& client, const String& hos
|
||||
return handleUpdate(http, currentVersion, false);
|
||||
}
|
||||
|
||||
HTTPUpdateResult ESP8266HTTPUpdate::update(HTTPClient& httpClient, const String& currentVersion)
|
||||
{
|
||||
return handleUpdate(httpClient, currentVersion, false);
|
||||
}
|
||||
|
||||
HTTPUpdateResult ESP8266HTTPUpdate::updateFS(HTTPClient& httpClient, const String& currentVersion)
|
||||
{
|
||||
return handleUpdate(httpClient, currentVersion, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* return error code as int
|
||||
* @return int error code
|
||||
|
@ -120,6 +120,8 @@ public:
|
||||
t_httpUpdate_return update(WiFiClient& client, const String& host, uint16_t port, const String& uri = "/",
|
||||
const String& currentVersion = "");
|
||||
t_httpUpdate_return updateFS(WiFiClient& client, const String& url, const String& currentVersion = "");
|
||||
t_httpUpdate_return update(HTTPClient& httpClient, const String& currentVersion = "");
|
||||
t_httpUpdate_return updateFS(HTTPClient& httpClient, const String& currentVersion = "");
|
||||
|
||||
// Notification callbacks
|
||||
void onStart(HTTPUpdateStartCB cbOnStart) { _cbStart = cbOnStart; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user