Initial commit
This commit is contained in:
6
core/asyncHandler.py
Normal file
6
core/asyncHandler.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import aiohttp
|
||||
|
||||
async def get(url, json=True):
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(url) as response:
|
||||
return (await response.json()) if json else (await response.text())
|
||||
Reference in New Issue
Block a user