From: Tom Christie Date: Thu, 4 Apr 2019 17:34:17 +0000 (+0100) Subject: Update README X-Git-Tag: 0.0.1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68b80dcfb043715350d277d6411e966a03a7de59;p=thirdparty%2Fhttpx.git Update README --- diff --git a/README.md b/README.md index 20d0ffac..8993770d 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ assert response.status_code == 200 assert response.body == b'Hello, world' ``` -API... +Top-level API... ```python response = await httpcore.request(method, url, [headers], [body], [stream]) @@ -80,3 +80,11 @@ Explicit PoolManager... async with httpcore.PoolManager([ssl], [timeout], [limits]) as pool: response = await pool.request(method, url, [headers], [body], [stream]) ``` + +Streaming... + +```python +response = await httpcore.request(method, url, stream=True) +async for part in response.stream(): + ... +```