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
urlstr

The URL of the remote server

datadict

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

timeoutint, quantity_like

Time limit for establishing successful connection with remote server

request_typestr

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

headersdict

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

Returns
responserequests.Response

Response object returned by the remote server