esp_http_client
Posted: Tue Dec 25, 2018 12:38 pm
hello friends
I am trying esp_http_client example
I want to post some Data.
Here is the Code..........
************************************************************************************************************************************************
esp_http_client_config_t config = {
.url="http://someurl.com?id=var",
.event_handler = _http_event_handler,
.timeout_ms = 5000,
};
esp_http_client_handle_t client = esp_http_client_init(&config);
esp_err_t err;
const char *post_data = "i am running test data and example";
esp_http_client_set_method(client, HTTP_METHOD_POST);
esp_http_client_set_post_field(client, post_data, strlen(post_data));
while (1) {
err = esp_http_client_perform(client);
if (err != ESP_ERR_HTTP_EAGAIN) {
break;
}
}
************************************************************************************************************************************************
How do I set the form Variable so that I can receive the data like $data = $_POST['data'] in php file
Thanks
Arun
I am trying esp_http_client example
I want to post some Data.
Here is the Code..........
************************************************************************************************************************************************
esp_http_client_config_t config = {
.url="http://someurl.com?id=var",
.event_handler = _http_event_handler,
.timeout_ms = 5000,
};
esp_http_client_handle_t client = esp_http_client_init(&config);
esp_err_t err;
const char *post_data = "i am running test data and example";
esp_http_client_set_method(client, HTTP_METHOD_POST);
esp_http_client_set_post_field(client, post_data, strlen(post_data));
while (1) {
err = esp_http_client_perform(client);
if (err != ESP_ERR_HTTP_EAGAIN) {
break;
}
}
************************************************************************************************************************************************
How do I set the form Variable so that I can receive the data like $data = $_POST['data'] in php file
Thanks
Arun