python-dependency-injector/examples/miniapps/monitoring-daemon-asyncio/monitoringdaemon/http.py
Roman Mogylatov e56b72e411 Add prototype
2020-08-05 13:13:09 -04:00

12 lines
312 B
Python

"""Http client module."""
from aiohttp import ClientSession, ClientResponse
class HttpClient:
async def request(self, method: str, url: str) -> ClientResponse:
async with ClientSession() as session:
async with session.request(method, url) as response:
return response