Hi, I am trying to use treq for a project in which I am also going to generate a progress bar for the downloading session. But the problem I am facing is that I can't find a way to get the content length header from the response.
The "response.length" gives me "unknown size".So I there a way I can get the length for all types of content?
Thanks
On Sun, 10 Feb 2019 at 18:23, Mehtab Zafar mehtab.zafar98@gmail.com wrote:
Hi, I am trying to use treq for a project in which I am also going to generate a progress bar for the downloading session. But the problem I am facing is that I can't find a way to get the content length header from the response.
The "response.length" gives me "unknown size".So I there a way I can get the length for all types of content?
Thanks
Hi,
Which encoding is used for your response?
Do you have Chunked encoding https://en.wikipedia.org/wiki/Chunked_transfer_encoding In this case, the content length is not advertised in the response headers.
Regards,