I need to make a HTTP request and determine the response size in bytes. I have always used request
for simple HTTP requests, but I am wondering if I can achieve this using raw?
>>> r = requests.get('https://github.com/', stream=True)
>>> r.raw
My only problem is I don't understand what raw returns or how I could count this data-type in bytes? Is using request
and raw the right approach?
content-length
header, if it exists.