Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libraries/HTTPUpdate/src/HTTPUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ HTTPUpdateResult HTTPUpdate::update(NetworkClient &client, const String &url, co
}
return handleUpdate(http, currentVersion, false, requestCB);
}
HTTPUpdateResult HTTPUpdate::update(NetworkClient &client,HTTPClient &httpclient, const String &url, const String &currentVersion, HTTPUpdateRequestCB requestCB){
if (!httpclient.begin(client, url)) {
return HTTP_UPDATE_FAILED;
}
return handleUpdate(httpclient, currentVersion, false, requestCB);
}

HTTPUpdateResult HTTPUpdate::updateSpiffs(HTTPClient &httpClient, const String &currentVersion, HTTPUpdateRequestCB requestCB) {
return handleUpdate(httpClient, currentVersion, true, requestCB);
Expand Down
4 changes: 4 additions & 0 deletions libraries/HTTPUpdate/src/HTTPUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class HTTPUpdate {
}

t_httpUpdate_return update(NetworkClient &client, const String &url, const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);

t_httpUpdate_return update(
NetworkClient &client,HTTPClient &httpclient, const String &url, const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL
);

t_httpUpdate_return update(
NetworkClient &client, const String &host, uint16_t port, const String &uri = "/", const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL
Expand Down