The request timeout, in seconds (default: 300.0). If the request takes longer than the timeout, a TimeoutError is raised. The maximum allowed timeout is 1800 seconds.
headers
The HTTP request headers. If present, must be a map of strings.
query
Optional query parameters. If present, must be a map that will get URL-encoded and appended to the URL. The map values must be strings, ints, floats, booleans, or lists of those.
auth
Optional authentication properties. If present, must be a map with type attribute in ["OIDC", "OAuth2"]. A scopes key is also supported. For details, see Make authenticated requests to Google Cloud APIs.
private_service_name
string
If present, private_service_name must be a string that specifies a registered Service Directory service name with format projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service.
ca_certificate
bytes
If present, ca_certificate must be a bytes value describing a custom CA certificate in DER format that will be used in place of the standard certificate pool. The certificate must be signed by a subject alternative name as defined by RFC 3280.
Returns
The HTTP response as a map with body, code (status code), and headers
attributes.
Raised exceptions
Exceptions
ConnectionError
In case of a network problem (DNS failure, truncated response, etc.).
ConnectionFailedError
When the connection is halted during transfer (failed connection, refused connection, etc.).
TimeoutError
When the specified timeout is reached before the response is received.
HttpError
If the response status is >= 400.
ValueError
If timeout is > 1800. If the URL is invalid or if authType is present and URL is invalid for the given authType. If the private_service_name is invalid. If private_service_name is present and URL contains a port. If ca_certificate is present and not of type bytes.
Examples
# Return titles of Wikipedia articles# related to "Canada"-searchWikipedia:call:http.getargs:url:'https://en.wikipedia.org/w/api.php'timeout:20# secondsheaders:# map of strings"Accept-Charset":"utf-8"# Append search parameters to URLquery:"action":"opensearch""search":"Canada"result:x# `x` is a map and `x.body` is an array# Article titles are stored in# first index of `x.body`-returnStep:return:${x.body[1]}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Function: http.get\n\nSends an HTTP `GET` request to the specified URL.\n\nFor more information, see\n[Make an HTTP request](https://cloud.google.com/workflows/docs/http-requests).\n\nArguments\n---------\n\nReturns\n-------\n\nThe HTTP response as a map with `body`, `code` (status code), and `headers`\nattributes.\n\nRaised exceptions\n-----------------\n\nExamples\n--------\n\n```yaml\n# Return titles of Wikipedia articles\n# related to \"Canada\"\n- searchWikipedia:\n call: http.get\n args:\n url: 'https://en.wikipedia.org/w/api.php'\n timeout: 20 # seconds\n headers: # map of strings\n \"Accept-Charset\": \"utf-8\"\n # Append search parameters to URL\n query:\n \"action\": \"opensearch\"\n \"search\": \"Canada\"\n result: x\n # `x` is a map and `x.body` is an array\n # Article titles are stored in\n # first index of `x.body`\n- returnStep:\n return: ${x.body[1]}\n```"]]