kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'feature/add_get_errno_api_for_http_client' into 'master'
esp_http_client: add a get HTTP client session errno API for esp_http_client See merge request espressif/esp-idf!15869pull/7966/head
commit
ec9b69d7e3
|
@ -904,6 +904,15 @@ error:
|
|||
return ret;
|
||||
}
|
||||
|
||||
int esp_http_client_get_errno(esp_http_client_handle_t client)
|
||||
{
|
||||
if (!client) {
|
||||
ESP_LOGE(TAG, "Invalid client handle");
|
||||
return -1;
|
||||
}
|
||||
return esp_transport_get_errno(client->transport);
|
||||
}
|
||||
|
||||
esp_err_t esp_http_client_set_method(esp_http_client_handle_t client, esp_http_client_method_t method)
|
||||
{
|
||||
client->connection_info.method = method;
|
||||
|
|
|
@ -344,6 +344,17 @@ esp_err_t esp_http_client_set_password(esp_http_client_handle_t client, const ch
|
|||
*/
|
||||
esp_err_t esp_http_client_set_authtype(esp_http_client_handle_t client, esp_http_client_auth_type_t auth_type);
|
||||
|
||||
/**
|
||||
* @brief Get HTTP client session errno
|
||||
*
|
||||
* @param[in] client The esp_http_client handle
|
||||
*
|
||||
* @return
|
||||
* - (-1) if invalid argument
|
||||
* - errno
|
||||
*/
|
||||
int esp_http_client_get_errno(esp_http_client_handle_t client);
|
||||
|
||||
/**
|
||||
* @brief Set http request method
|
||||
*
|
||||
|
|
Ładowanie…
Reference in New Issue