-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Allow passing custom HTTPClient to HTTPUpdate #4959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
05e4ef5
a86911d
7f05cb3
600a67c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,11 @@ HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& url, const | |
return handleUpdate(http, currentVersion, false); | ||
} | ||
|
||
HTTPUpdateResult HTTPUpdate::updateSpiffs(HTTPClient& httpClient, const String& url, const String& currentVersion) | ||
{ | ||
return handleUpdate(httpClient, currentVersion, true); | ||
} | ||
|
||
HTTPUpdateResult HTTPUpdate::updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion) | ||
{ | ||
HTTPClient http; | ||
|
@@ -68,6 +73,12 @@ HTTPUpdateResult HTTPUpdate::updateSpiffs(WiFiClient& client, const String& url, | |
return handleUpdate(http, currentVersion, true); | ||
} | ||
|
||
HTTPUpdateResult HTTPUpdate::update(HTTPClient& httpClient, const String& host, uint16_t port, const String& uri, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does not need the |
||
const String& currentVersion) | ||
{ | ||
return handleUpdate(httpClient, currentVersion, false); | ||
} | ||
|
||
HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& host, uint16_t port, const String& uri, | ||
const String& currentVersion) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,10 @@ class HTTPUpdate | |
|
||
t_httpUpdate_return updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion = ""); | ||
|
||
t_httpUpdate_return update(HTTPClient& httpClient, const String& host, uint16_t port, const String& uri = "/", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does not need the |
||
const String& currentVersion = ""); | ||
|
||
t_httpUpdate_return updateSpiffs(HTTPClient &httpClient, const String &url, const String ¤tVersion = ""); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does not need the |
||
|
||
int getLastError(void); | ||
String getLastErrorString(void); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not need the
url
argument :)