I am using libcurl, currently the easy api. I am making a request to a web server that responds with HTTP Chunked Encoding. I would like to know if there is a way to know when a chunk from the server has finished. I was looking for some type of callback. DEBUGDATA didn't seem to include it, and CHUNK_END_FUNCTION seemed to be unrelated.
If you use the CURLOPT_DEBUGFUNCTION option you will get the data "un-chunked" and then you can scan and parse the data yourself as you see fit and thus track the end of chunks or whatever you like. ()
As "n.m." already said, libcurl has no API that exposes chunks as it tries to make the transfer encoding completely transparent to users.
Alternatively, applications can tell libcurl to not decode chunked transfer encoding at all and instead pass it on as-is to the application with CURLOPT_HTTP_TRANSFER_DECODING.