mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-29 13:04:02 +03:00
2fc3606671
* Add prototype * Update .pydocstylerc * Add tests * Remove one of the tests * Fix typo in the giphynav-aiohttp * Add README * Fix flake8
12 lines
371 B
Python
12 lines
371 B
Python
"""Http client module."""
|
|
|
|
from aiohttp import ClientSession, ClientTimeout, ClientResponse
|
|
|
|
|
|
class HttpClient:
|
|
|
|
async def request(self, method: str, url: str, timeout: int) -> ClientResponse:
|
|
async with ClientSession(timeout=ClientTimeout(timeout)) as session:
|
|
async with session.request(method, url) as response:
|
|
return response
|