mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-16 04:22:22 +00:00
esp_http_client: add a get HTTP client session errno api for esp_http_client
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user