Unable to iterate over chunks as sent by server. #1805
Closed
Description
Long story short
I am talking to a HTTP server that uses transfer-encoding: chunked to stream records, whith each chunk representing one record.
aiohttp currently offers no API for iterating over the chunks exactly as sent by the server.
Expected behaviour
I would expect the response.content.iter_chunked(n) method to default to the chunking already defined by the server if n=None or a special flag is passed.
See the similar method in the Requests library that shows the desired behaviour.
Actual behaviour
n=None returns an empty bytestring, while n=-1 doesn't return at all.
There is no method to recover the chunking of the server.