I started to work with aiohttp. In order to make an HTTP POST request, after the following code was successful:
async with aiohttp.ClientSession() as session:
async with session.get('http://httpbin.org/get') as resp:
print(resp.status)
print(await resp.text())
I used ClientSession.post() coroutine:
session.post('http://httpbin.org/post', data=b'data')
Python answered that the name session is not defined. What's wrong with this script?