From: Luís Gustavo <26727089+luissilva1044894@users.noreply.github.com> Date: Thu, 9 Jan 2020 12:23:33 +0000 (-0300) Subject: Fix typo in 'Streaming responses' docs (#744) X-Git-Tag: 0.11.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c225e95b1d530c0929006251db1b8147c898ab87;p=thirdparty%2Fhttpx.git Fix typo in 'Streaming responses' docs (#744) --- diff --git a/docs/async.md b/docs/async.md index be0c2cfa..7cd2d0d5 100644 --- a/docs/async.md +++ b/docs/async.md @@ -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.