send_request

astroquery.utils.send_request(url, data, timeout, request_type='POST', headers={}, **kwargs)[source]

A utility function that post HTTP requests to remote server and returns the HTTP response.

Parameters:
url : str

The URL of the remote server

data : dict

A dictionary representing the payload to be posted via the HTTP request

timeout : int, quantity_like

Time limit for establishing successful connection with remote server

request_type : str

options are ‘POST’ (default) and ‘GET’. Determines whether to perform an HTTP POST or an HTTP GET request

headers : dict

POST or GET headers. user-agent will be set to astropy:astroquery.version

Returns:
response : requests.Response

Response object returned by the remote server