Fixed compilation error with ESP-IDF V4.4
This commit is contained in:
+3
-1
@@ -142,10 +142,12 @@ static void http_rest_with_url(char * path, char * post_data)
|
||||
esp_http_client_set_header(client, "Content-Type", "application/json");
|
||||
esp_http_client_set_post_field(client, post_data, strlen(post_data));
|
||||
esp_err_t err = esp_http_client_perform(client);
|
||||
// ESP-IDF V4.4 int esp_http_client_get_content_length
|
||||
// ESP-IDF V5.0 int64_t esp_http_client_get_content_length
|
||||
if (err == ESP_OK) {
|
||||
ESP_LOGI(TAG, "HTTP POST Status = %d, content_length = %lld",
|
||||
esp_http_client_get_status_code(client),
|
||||
esp_http_client_get_content_length(client));
|
||||
(int64_t)esp_http_client_get_content_length(client));
|
||||
ESP_LOGI(TAG, "local_response_buffer=[%s]", local_response_buffer);
|
||||
} else {
|
||||
ESP_LOGE(TAG, "HTTP POST request failed: %s", esp_err_to_name(err));
|
||||
|
||||
Reference in New Issue
Block a user