Advertisement
chris98

Untitled

Apr 21st, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import asyncio
  2. import aiohttp
  3.  
  4. async def checkItOut(session):
  5.     async with session.post(CHECKOUT, data=CHECKOUT_DATA, headers=CHECKOUT_HEADERS ) as response:
  6.         return response.text()
  7.  
  8. loop = asyncio.get_event_loop()
  9. async with aiohttp.ClientSession(loop=loop) as session:
  10.     loop.run_until_complete(checkItOut(session))
  11. loop.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement