Skip to content

Commit

Permalink
Update CHANGES
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Mar 27, 2018
1 parent 9f2de0d commit 94295e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Changelog

.. towncrier release notes start
3.1.1 (2018-03-27)
==================

* Support *asynchronous iterators* (and *asynchronous generators* as
well) in both client and server API as request / response BODY
payloads. (#2802)


3.1.0 (2018-03-21)
==================

Expand Down
11 changes: 10 additions & 1 deletion docs/client_quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,18 @@ Or you can use *asynchronous generator*::
data=file_sender(file_name='huge_file')) as resp:
print(await resp.text())


Because the :attr:`~aiohttp.ClientResponse.content` attribute is a
:class:`~aiohttp.StreamReader` (provides async iterator protocol), you
can chain get and post requests together::

resp = await session.get('http://python.org')
await session.post('http://httpbin.org/post',
data=resp.content)

.. note::

Python 3.5 has no support for asynchronous generators, use
Python 3.5 has no native support for asynchronous generators, use
``async_generator`` library as workaround.

.. deprecated:: 3.1
Expand Down

0 comments on commit 94295e5

Please sign in to comment.