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
There was existing support for adding authorization info in esp_http_client
but it was functional only while using `esp_http_client_perform` API. This commit just moves
existing authorization addition logic into publicly exposed API.
When using direct operations instead of `esp_http_client_perform`, we need a way to set redirection URL when we get 30x response codes. Added the function for the same.
User can now check status code and call `esp_http_client_set_redirection` function to enable redirection.
Related change in adf: https://gitlab.espressif.cn:6688/adf/esp-adf-internal/merge_requests/187
Closes https://github.com/espressif/esp-idf/issues/2712
Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
Four internal APIs `esp_http_client_connect()`, `http_client_prepare_first_line()`, `esp_http_client_request_send()` and
`esp_http_client_send_post_data()` API have been added for perfoming connection establishment (sync as well as async),
preparing first line, sending request and sending post data respectively.
In `transport_ssl`, `ssl_connect_async()` API has been added for establishing asynchronous connection.
Add error handling for http client
set ssid password correct with Example_WIFI test, and clear password before free
Fixed the CI failure due to HTTP errror names