From 26475c73ec3a90c8b62fdf10fbd8075246533751 Mon Sep 17 00:00:00 2001 From: Adrian Rangel Date: Fri, 26 Apr 2019 10:53:06 -0500 Subject: [PATCH] update readme to real async get --- README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 0e6676a..90bee3b 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,6 @@ Let's send 100 concurrent requests! \\o/ **Example Usage** using ``async``/``await`` — .. code:: python - from requests_threads import AsyncSession session = AsyncSession(n=100) @@ -25,7 +24,9 @@ Let's send 100 concurrent requests! \\o/ async def _main(): rs = [] for _ in range(100): - rs.append(await session.get('http://httpbin.org/get')) + rs.append(session.get('http://httpbin.org/get')) + for i in range(100): + rs[i] = await rs[i] print(rs) if __name__ == '__main__':