<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def _request(self, method, url, loop=None, timeout=None, **kwargs):
 """Make a request through AIOHTTP."""

        session = self.session or aiohttp.ClientSession(
            loop=loop, conn_timeout=timeout, read_timeout=timeout)
        try:
            async with session.request(method, url, **kwargs) as response:

                if response.status / 100 > 2:
                    raise web.HTTPBadRequest(
                        reason='HTTP status code: %s' % response.status)

                if 'json' in response.headers.get('CONTENT-TYPE'):
                    data = await response.json()
                else:
                    data = await response.text()
                    data = dict(parse_qsl(data))

                return data

        except asyncio.TimeoutError:
            raise web.HTTPBadRequest(reason='HTTP Timeout')

        finally:
            if not self.session and not session.closed:
                await session.close()