Closed deshmukhrajvardhan closed 6 years ago
Hi all, i wanted to read the response in a block of data units. So, is there a way to use the read(DATA_BLOCK_SIZE) iteratively till all the response data is read?
(Just like the 'iter_content(CHUNK_SIZE)' in the requests library)
Thanks, Raj
Perhaps
chunk = read() while chunk: # do stuff chunk = read()
Yeah, call read repeatedly.
read
Thanks https://github.com/sigmavirus24 and https://github.com/Lukasa
It works fine.
Hi all, i wanted to read the response in a block of data units. So, is there a way to use the read(DATA_BLOCK_SIZE) iteratively till all the response data is read?
(Just like the 'iter_content(CHUNK_SIZE)' in the requests library)
Thanks, Raj