code: async def request(
              self,
              method: str,
              endpoint: str,
              *,
              headers: dict = None,
              params: dict = None) -> dict:
          
          url = '{0}/{1}'.format(API_URL_SCAFFOLD, endpoint)
  
          if not headers:
              headers = {}
          headers.update({'x-access-token': self._api_key})
  
          if not params:
              params = {}
          params.update({
              'lat': self.latitude,
              'lng': self.longitude,
              'alt': self.altitude
          })
  
          async with self._websession.request(method, url, headers=headers,
                                              params=params) as resp:
              try:
                  resp.raise_for_status()
                  return await resp.json(content_type=None)
              except client_exceptions.ClientError as err:
                  if any(code in str(err) for code in ('401', '403')):
                      raise InvalidApiKeyError('Invalid API key')
                  raise RequestError(
                      'Error requesting data from {0}: {1}'.format(
                          endpoint, err)) from None
docs: Make a request against air-matters.com.