Page 1 of 1

How to read downloaded HTTP chunked data?

Posted: Fri May 03, 2019 8:32 am
by MikeWazowski
In the esp_http_client example I am able to get a "200 OK" response in function http_download_chunk().

This indicates chunked data has been successfully downloaded, but how do I read this data as I could not find an API function in HTTP Client to do so.
Only way I could access data was through HTTP_EVENT_ON_DATA, but I am not sure if that is the proper way of previewing data and what are the risks involved with this method.

Ideally I would want to recieve a file and write it to device's flash.

Re: How to read downloaded HTTP chunked data?

Posted: Tue May 07, 2019 1:14 pm
by MikeWazowski
esp_http_client_read() seems to do the work.