dxsp.utils.utils.fetch_url#

async dxsp.utils.utils.fetch_url(url, params=None, headers=None)[source]#

Asynchronously gets a url payload and returns the response.

Parameters:
  • url (str) – The url to get.

  • params (dict, optional) – The params to send. Defaults to None.

  • headers (dict, optional) – The headers to send. Defaults to None.

Returns:

The response or None if an error occurs or the response is too large.

Return type:

dict or None