mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
esp_https_ota: Add a feature to set custom headers to esp_https_ota request
Closes: https://github.com/espressif/esp-idf/issues/3097
This commit is contained in:
@@ -173,6 +173,14 @@ esp_err_t esp_https_ota_begin(esp_https_ota_config_t *ota_config, esp_https_ota_
|
||||
goto failure;
|
||||
}
|
||||
|
||||
if (ota_config->http_client_init_cb) {
|
||||
err = ota_config->http_client_init_cb(https_ota_handle->http_client);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "http_client_init_cb returned %d", err);
|
||||
goto failure;
|
||||
}
|
||||
}
|
||||
|
||||
err = _http_connect(https_ota_handle->http_client);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to establish HTTP connection");
|
||||
|
Reference in New Issue
Block a user