mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-23 03:39:33 +00:00
esp_http_client: Add support to check the binary length of the recieved stream and compare it with the size mentioned in the header.
While downloading OTA firmware, if their is a Origin Respnse Timeout or the binary is only partially downloaded, OTA failure is observed. Checking binary size can also be helpful for simple http client applications. Closes https://github.com/espressif/esp-idf/issues/3004
This commit is contained in:
committed by
Mahavir Jain
parent
90a6855d01
commit
d4091f7cda
@@ -445,6 +445,17 @@ esp_err_t esp_http_client_set_redirection(esp_http_client_handle_t client);
|
||||
*/
|
||||
void esp_http_client_add_auth(esp_http_client_handle_t client);
|
||||
|
||||
/**
|
||||
* @brief Checks if entire data in the response has been read without any error.
|
||||
*
|
||||
* @param[in] client The esp_http_client handle
|
||||
*
|
||||
* @return
|
||||
* - true
|
||||
* - false
|
||||
*/
|
||||
bool esp_http_client_is_complete_data_received(esp_http_client_handle_t client);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user