async def request(
            self,
            method: str,
            endpoint: str,
            *,
            base_url: str = API_URL_SCAFFOLD,
            headers: dict = None,
            params: dict = None,
            json: dict = None) -> dict:
        """Make a request against AirVisual."""
        if not headers:
            headers = {}
        headers.update({'Content-Type': 'application/json'})

        if not params:
            params = {}

        if self._api_key:
            params.update({'key': self._api_key})

        url = '{0}/{1}'.format(base_url, endpoint)
        async with self.websession.request(method, url, headers=headers,
                                           params=params, json=json) as resp:
            data = await resp.json(content_type=None)
            _raise_on_error(data)
            return data