]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fix typo in 'Streaming responses' docs (#744)
authorLuís Gustavo <26727089+luissilva1044894@users.noreply.github.com>
Thu, 9 Jan 2020 12:23:33 +0000 (09:23 -0300)
committerTom Christie <tom@tomchristie.com>
Thu, 9 Jan 2020 12:23:33 +0000 (12:23 +0000)
docs/async.md

index be0c2cfa375771f47b36a52ade2a153ecccc68b8..7cd2d0d5d1e0ae535fc83d3884f16676a6750345 100644 (file)
@@ -67,14 +67,14 @@ The `AsyncClient.stream(method, url, ...)` method is an async context block.
 ```python
 >>> client = httpx.AsyncClient()
 >>> async with client.stream('GET', 'https://www.example.com/') as response:
->>>     async for chunk in r.aiter_content():
+>>>     async for chunk in response.aiter_bytes():
 >>>         ...
 ```
 
 The async response streaming methods are:
 
 * `Response.aread()` - For conditionally reading a response inside a stream block.
-* `Response.aiter_content()` - For streaming the response content as bytes.
+* `Response.aiter_bytes()` - For streaming the response content as bytes.
 * `Response.aiter_text()` - For streaming the response content as text.
 * `Response.aiter_lines()` - For streaming the response content as lines of text.
 * `Response.aiter_raw()` - For streaming the raw response bytes, without applying content decoding.