Afterwards, I tried using the base of the http_native_request function, making the changes so I could connect through HTTPS. I manage to do it and also could read the content response from the server to the HTTPS request using esp_http_client_read_response.
So, because esp_http_client_perform is easier to use than all the way with the native path, I'm trying to extract this information but I could not do it. I also try adding a queue in the handler to send this data, but it didn't work, the data arrive incomplete or not even readable.
Hopefully, some of you might know this. Thanks
Note: here you can see the esp_http_client example: https://github.com/espressif/esp-idf/bl ... _example.c
Edit: reading better the esp_http_client and found that they declare a variable for the buffer and if in the config for the handler of the http you pass this variable to .user_data you, after using esp_http_client_perform you can check the response from the server there.
Code: Select all
char buffer[MAX_HTTP_OUTPUT_BUFFER] = {0};
esp_http_client_config_t config = {
.url = "https://postman.org",
.transport_type = HTTP_TRANSPORT_OVER_SSL,
.event_handler = _http_event_handler,
.user_data = buffer, // Pass address of local buffer to get response
};