passage meteofrance https
This commit is contained in:
parent
16b277ff99
commit
72a58b373d
@ -29,7 +29,7 @@ static const char *TAG = "MeteoFrance";
|
|||||||
Typically only LOCATION_ID may need to be changed
|
Typically only LOCATION_ID may need to be changed
|
||||||
*/
|
*/
|
||||||
#define WEB_SERVER "webservice.meteofrance.com" //"192.168.0.10" //"www.example.com"// //"webservice.meteofrance.com"
|
#define WEB_SERVER "webservice.meteofrance.com" //"192.168.0.10" //"www.example.com"// //"webservice.meteofrance.com"
|
||||||
#define WEB_PORT 80 // 5403 //80
|
#define WEB_PORT 443 // 5403 //80
|
||||||
#define WEB_URL "/forecast"
|
#define WEB_URL "/forecast"
|
||||||
#define TOKEN "__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__"
|
#define TOKEN "__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__"
|
||||||
// Location ID to get the weather data for
|
// Location ID to get the weather data for
|
||||||
@ -353,12 +353,15 @@ static void http_request_task(void* domotic_event_group)
|
|||||||
.query = WEB_QUERY,
|
.query = WEB_QUERY,
|
||||||
.event_handler = _http_event_handler,
|
.event_handler = _http_event_handler,
|
||||||
.user_data = local_response_buffer, // Pass address of local buffer to get response
|
.user_data = local_response_buffer, // Pass address of local buffer to get response
|
||||||
.disable_auto_redirect = true,
|
.disable_auto_redirect = false,
|
||||||
|
.transport_type = HTTP_TRANSPORT_OVER_SSL,
|
||||||
|
.cert_pem = NULL,
|
||||||
|
.skip_cert_common_name_check = true
|
||||||
};
|
};
|
||||||
esp_http_client_handle_t client = esp_http_client_init(&config);
|
esp_http_client_handle_t client = esp_http_client_init(&config);
|
||||||
char url[50];
|
char url[50];
|
||||||
esp_http_client_get_url(client, url, 50);
|
esp_http_client_get_url(client, url, 50);
|
||||||
ESP_LOGV(TAG, "%s", url);
|
ESP_LOGE(TAG, "%s", url);
|
||||||
|
|
||||||
// GET
|
// GET
|
||||||
esp_err_t err = esp_http_client_perform(client);
|
esp_err_t err = esp_http_client_perform(client);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user