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);