httpc icon indicating copy to clipboard operation
httpc copied to clipboard

Accessing Content-Length without manual parsing

Open denravonska opened this issue 1 year ago • 0 comments

It looks like the content length is parsed by httpc during header reception, but it seems to be tucked away in an opaque struct that's inaccessible to the caller. Is there any way to expose this after- or during a request is made, preferably without having to use a data callback and parse the headers again?

The reason it could be good is if you need to download a large file in smaller chunks. You'd then do a HEAD request to check how large the file is, then do a GET with range boundaries.

denravonska avatar Mar 21 '24 09:03 denravonska