Get esp_http_client_config_t from esp_http_client_handle_t?
Posted: Tue Nov 29, 2022 12:00 pm
Is it possible to get the client configuration from the client handle after the client is initialized?
For example:
Now, is it possible to access the client configuration in another function, something like this:
More specifically, I'd like to access user_data field in the configuration.
For example:
Code: Select all
char name[] = "example";
esp_http_client_config_t cfg =
{
.host = "httpbin.org",
.path = "/get",
.method = HTTP_METHOD_GET,
.user_data = name,
}
esp_http_client_handle_t cli = esp_http_client_init(&cfg);
Code: Select all
esp_http_client_config_t* cfg = esp_http_get_client_config(cli);