##// END OF EJS Templates
docs: update the aiohttp usage in autoawait.rst...
Sebastian Witowski -
Show More
@@ -29,7 +29,8 b' Python REPL::'
29 [GCC 4.2.1]
29 [GCC 4.2.1]
30 Type "help", "copyright", "credits" or "license" for more information.
30 Type "help", "copyright", "credits" or "license" for more information.
31 >>> import aiohttp
31 >>> import aiohttp
32 >>> result = aiohttp.get('https://api.github.com')
32 >>> session = aiohttp.ClientSession()
33 >>> result = session.get('https://api.github.com')
33 >>> response = await result
34 >>> response = await result
34 File "<stdin>", line 1
35 File "<stdin>", line 1
35 response = await result
36 response = await result
@@ -43,7 +44,8 b' Should behave as expected in the IPython REPL::'
43 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
44 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
44
45
45 In [1]: import aiohttp
46 In [1]: import aiohttp
46 ...: result = aiohttp.get('https://api.github.com')
47 ...: session = aiohttp.ClientSession()
48 ...: result = session.get('https://api.github.com')
47
49
48 In [2]: response = await result
50 In [2]: response = await result
49 <pause for a few 100s ms>
51 <pause for a few 100s ms>
General Comments 0
You need to be logged in to leave comments. Login now