#include <HttpUpgrader.h>
|
void | applyUpdate () |
|
void | downloadFailed () |
|
void | downloadComplete () |
|
void | fetchNextItem () |
|
int | itemComplete (HttpConnection &client, bool success) |
|
String | getCacheKey (const Url &url) |
|
virtual | ~HttpClient () |
| HttpClient destructor. More...
|
|
bool | sendRequest (const Url &url, RequestCompletedDelegate requestComplete) |
|
bool | sendRequest (const HttpMethod method, const Url &url, const HttpHeaders &headers, RequestCompletedDelegate requestComplete) |
|
bool | sendRequest (const HttpMethod method, const Url &url, const HttpHeaders &headers, const String &body, RequestCompletedDelegate requestComplete) |
|
bool | sendRequest (const HttpMethod method, const Url &url, const HttpHeaders &headers, String &&body, RequestCompletedDelegate requestComplete) noexcept |
|
bool | downloadString (const Url &url, RequestCompletedDelegate requestComplete, size_t maxLength=NETWORK_SEND_BUFFER_SIZE) |
| Queue request to download content as string (in memory) More...
|
|
bool | downloadFile (const Url &url, RequestCompletedDelegate requestComplete=nullptr) |
|
bool | downloadFile (const Url &url, const String &saveFileName, RequestCompletedDelegate requestComplete=nullptr) |
| Queue request to download a file. More...
|
|
bool | send (HttpRequest *request) |
|
HttpRequest * | createRequest (const Url &url) |
| Helper function to create a new request on a URL. More...
|
|
◆ CompletedDelegate
◆ Partition
◆ addItem()
Add an item to update.
- Parameters
-
firmwareFileUrl | |
partition | Target partition to write |
stream | |
- Return values
-
◆ applyUpdate()
void Ota::Network::HttpUpgrader::applyUpdate |
( |
| ) |
|
|
protected |
◆ downloadComplete()
void Ota::Network::HttpUpgrader::downloadComplete |
( |
| ) |
|
|
protected |
◆ downloadFailed()
void Ota::Network::HttpUpgrader::downloadFailed |
( |
| ) |
|
|
protected |
◆ fetchNextItem()
void Ota::Network::HttpUpgrader::fetchNextItem |
( |
| ) |
|
|
protected |
◆ getItems()
const ItemList& Ota::Network::HttpUpgrader::getItems |
( |
| ) |
const |
|
inline |
Allow read access to item list.
◆ itemComplete()
int Ota::Network::HttpUpgrader::itemComplete |
( |
HttpConnection & |
client, |
|
|
bool |
success |
|
) |
| |
|
protected |
◆ setBaseRequest()
void Ota::Network::HttpUpgrader::setBaseRequest |
( |
HttpRequest * |
request | ) |
|
|
inline |
Sets the base request that can be used to pass.
- default request parameters, like request headers...
- default SSL options
- default SSL fingeprints
- default SSL client certificates
- Parameters
-
◆ setCallback()
◆ setDelegate()
◆ start()
void Ota::Network::HttpUpgrader::start |
( |
| ) |
|
◆ switchToRom()
void Ota::Network::HttpUpgrader::switchToRom |
( |
uint8_t |
romSlot | ) |
|
|
inline |
On completion, switch to the given ROM slot.
- Parameters
-
romSlot | specify NO_ROM_SWITCH (the default) to cancel any previously set switch |
◆ baseRequest
HttpRequest* Ota::Network::HttpUpgrader::baseRequest {nullptr} |
|
protected |
◆ currentItem
uint8_t Ota::Network::HttpUpgrader::currentItem {0} |
|
protected |
◆ items
ItemList Ota::Network::HttpUpgrader::items |
|
protected |
◆ romSlot
◆ updateDelegate
The documentation for this class was generated from the following file: