import aiohttp


async def request(
        bot, method, url, session_kwargs={}, method_kwargs={},
        response_method='text', response_method_kwargs={}):
    """Wraps aiohttp methods for making a request."""
    async with aiohttp.ClientSession(**session_kwargs) as session:
        async with getattr(session, method)(url, **method_kwargs) as response:
            return (response, await getattr(response, response_method)(**response_method_kwargs))