Sends an HTTP GET request to the specified URL.
Arguments
Arguments | |
---|---|
url |
The URL to send the request to.
|
timeout |
The desired request timeout, in seconds (default:
|
body |
If present, the request body (it is rare but allowed to send body in a GET request). |
headers |
The HTTP request headers. If present, must be a dictionary of simple types. |
query |
Optional query parameters. If present, must be a dictionary of simple types, that will get URL-encoded and appended to the URL. |
auth |
Optional authentication properties. If present, must be a dictionary, with type attribute in ["OIDC", "OAuth2"] . |
Returns
The HTTP response object.
Raised exceptions
Exceptions | |
---|---|
ConnectionError |
In case of a network problem (DNS failure, refused connection, etc.). |
TimeoutError |
When the specified timeout is reached before the response is received. |
HttpError |
If the response status is >= 400. |