HTTP / REST
The HTTP / REST connector executes HTTP requests and interacts with REST APIs. It supports standard HTTP methods and works in two modes: as standalone static utilities for immediate, one-off calls, or as a persistent instance client configured with uniform base URLs, shared header contexts, and automated authentication handlers.
This connector supports mixed execution options, meaning you can call static functions directly or use instance creation. See Tips and tricks for the error behavior and a shortcut for passing query parameters.
Static functions
get
Performs an HTTP GET request to fetch a resource from a remote server.
Parameters
url
The full destination URL of the endpoint.
string
options
params
URL query parameters sent as key-value pairs.
object
headers
Custom HTTP headers included with the request.
object
timeout
Request timeout in milliseconds.
integer
auth
Basic authentication payload containing username and password strings.
object
Example
# url
https://api.open-meteo.com/v1/forecast
# options
params:
latitude: 53.5507
longitude: 9.993
hourly:
- temperature_2m
- rain
- cloud_cover
forecast_days: 1Output
Returns the parsed data payload from the server, typically as a JSON object, array, or raw string.
post
Performs an HTTP POST request to submit data payloads to a remote host.
Parameters
url
The full destination URL of the endpoint.
string
data
The payload body to deliver to the server. Accepts text, objects, or arrays.
any
options
params
URL query parameters sent as key-value pairs.
object
headers
Custom HTTP headers included with the request.
object
timeout
Request timeout in milliseconds.
integer
auth
Basic authentication configuration.
object
Example
Output
Returns the full response object from the server, including data, status, and headers.
put
Performs an HTTP PUT request to update or completely replace a target resource.
Parameters
url
The full destination URL of the endpoint.
string
data
The payload body to deliver to the server.
any
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
auth
Basic authentication configuration.
object
Output
Returns the full response object from the server, including data, status, and headers.
patch
Performs an HTTP PATCH request to apply partial modifications to a resource.
Parameters
url
The full destination URL of the endpoint.
string
data
The partial update data applied to the resource.
any
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
auth
Basic authentication configuration.
object
Output
Returns the full response object from the server, including data, status, and headers.
delete
Performs an HTTP DELETE request to remove a specific resource from the server.
Parameters
url
The full destination URL of the resource to delete.
string
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
auth
Basic authentication configuration.
object
Output
Returns the full response object from the server, including data, status, and headers.
head
Performs an HTTP HEAD request to fetch meta headers without reading the document response body.
Parameters
url
The full destination URL of the endpoint.
string
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
auth
Basic authentication configuration.
object
Output
Returns the full response object. For HEAD requests, the data body is empty and the relevant information sits in headers.
options
Performs an HTTP OPTIONS request to query the permissible communication methods allowed by the server.
Parameters
url
The full destination URL of the endpoint.
string
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
auth
Basic authentication configuration.
object
Output
Returns the full response object. The allowed communication options typically sit in the headers (such as Allow).
Instance client
create
Constructs a reusable, persistent HTTP client instance configured with shared authentication schemes, automated token management, and standardized relative path routing.
Parameters
baseUrl
The base URL string prepended automatically to all subsequent partial relative paths.
string
options
headers
Default headers sent with every request.
object
timeout
The default request timeout in milliseconds for all requests.
integer
username
The username for default HTTP basic authentication.
string
password
The password for default HTTP basic authentication.
string
token
The authentication token.
string
isBearer
If true, sends the token as a bearer token in the Authorization header. Takes precedence over authHeader.
boolean
authHeader
Sends the token in a custom HTTP header with this name.
string
authParameter
Sends the token as a URL query parameter with this name on every request.
string
Example
Output
Returns the name of the created instance.
get
Performs an HTTP GET request utilizing the pre-configured settings of the instance client.
Parameters
url
The relative path string (such as /blogs) appended to the base URL, or an absolute link.
string
options
params
URL query parameters sent as key-value pairs.
object
headers
Custom HTTP header elements overriding instance defaults.
object
timeout
Request timeout in milliseconds.
integer
Example
Output
Returns the parsed data payload from the server, typically as a JSON object, array, or raw string.
post
Performs an HTTP POST request utilizing the pre-configured settings of the instance client.
Parameters
url
The relative path string or absolute endpoint link.
string
data
The structured body data block submitted to the remote server.
any
options
params
URL query parameters.
object
headers
Custom HTTP headers overriding defaults.
object
timeout
Request timeout in milliseconds.
integer
Example
Output
Returns the full response object from the server, including data, status, and headers.
put
Performs an HTTP PUT request utilizing the pre-configured settings of the instance client.
Parameters
url
The relative path string or absolute link.
string
data
The data payload transferred to the server destination.
any
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
Output
Returns the full response object from the server, including data, status, and headers.
patch
Performs an HTTP PATCH request utilizing the pre-configured settings of the instance client.
Parameters
url
The relative path string or absolute link.
string
data
The partial modification payload.
any
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
Output
Returns the full response object from the server, including data, status, and headers.
delete
Performs an HTTP DELETE request utilizing the pre-configured settings of the instance client.
Parameters
url
The relative path string or absolute link targeting a resource.
string
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
Output
Returns the full response object from the server, including data, status, and headers.
head
Performs an HTTP HEAD request utilizing the pre-configured settings of the instance client.
Parameters
url
The relative path string or absolute link.
string
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
Output
Returns the full response object. For HEAD requests, the data body is empty and the relevant information sits in headers.
options
Performs an HTTP OPTIONS request utilizing the pre-configured settings of the instance client.
Parameters
url
The relative path string or absolute link.
string
options
params
URL query parameters.
object
headers
Custom HTTP headers.
object
timeout
Request timeout in milliseconds.
integer
Output
Returns the full response object. The allowed communication options typically sit in the headers (such as Allow).
Tips and tricks
Passing query parameters directly
You can pass a flat object straight into options. When it contains none of the keys params, headers, timeout, or auth, the connector interprets the entire object as the params query parameters.
Error behavior
Failed requests throw an error. When the server responds with an error status, the error message contains the status code and status text (such as 404 Not Found), and the response body is attached as the error cause. Network-level failures (such as an unreachable host or a timeout) throw the original error.
Last updated
Was this helpful?