code: async def request(
              self,
              method: str,
              endpoint: str,
              *,
              headers: dict = None,
              params: dict = None,
              data: dict = None) -> dict:
          
          if (self._session_expiry
                  and self._session_expiry <= current_epoch_time()):
              raise SessionExpiredError('Session has expired; make a new one!')
  
          url = '{0}/{1}'.format(API_URL_SCAFFOLD, endpoint)
  
          if not headers:
              headers = {}
          headers.update({
              'Tile_app_id': DEFAULT_APP_ID,
              'Tile_app_version': DEFAULT_APP_VERSION,
              'Tile_client_uuid': self.client_uuid,
          })
  
          async with self._websession.request(method, url, headers=headers,
                                              params=params, data=data) as resp:
              try:
                  resp.raise_for_status()
                  return await resp.json(content_type=None)
              except client_exceptions.ClientError as err:
                  raise RequestError(
                      'Error requesting data from {0}: {1}'.format(
                          endpoint, err)) from None
docs: Make a request against AirVisual.