How to read downloaded HTTP chunked data?

MikeWazowski
Posts: 10
Joined: Mon Apr 08, 2019 11:55 am

How to read downloaded HTTP chunked data?

Postby MikeWazowski » Fri May 03, 2019 8:32 am

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.

MikeWazowski
Posts: 10
Joined: Mon Apr 08, 2019 11:55 am

Re: How to read downloaded HTTP chunked data?

Postby MikeWazowski » Tue May 07, 2019 1:14 pm

esp_http_client_read() seems to do the work.

GFeonix
Posts: 23
Joined: Mon Sep 18, 2023 1:45 am

Re: How to read downloaded HTTP chunked data?

Postby GFeonix » Tue May 27, 2025 9:59 am

esp_http_client_read() seems to do the work.
Could you help showing an example? I try to receive the data with this function but receive nothing.

Who is online

Users browsing this forum: Applebot, Baidu [Spider], Perplexity-User, PetalBot and 17 guests