Files
BytesBump/core/asyncHandler.py
2021-03-07 20:55:27 +02:00

6 lines
226 B
Python

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())