Skip to main content

HTTP Component

Make HTTP requests to URLs such as REST APIs, Webhooks, etc

Component key: http

Description#

The HTTP component allows you to make requests to an HTTP-based API or endpoint.

Common HTTP verbs like GET, POST, PUT, PATCH, and DELETE are supported. For all actions, you can specify:

  • A URL to send a request to
  • A response type (like application/json)
  • A list of request headers
  • A list of query parameters

In addition, the POST, PUT, and PATCH actions allow you to specify data to send as part of the request. data can be a reference to a binary file, a string literal, or any structured data that is expected in the body of the request.

Authorization Methods#

HTTP can use the following authorization methods, though no authorization method is required:

Auth TypeKeyDescriptionFields
API Keyapi_keyAPI authorization based on an API key

API Key |  api_key

Basic AuthbasicBasic authorization using a username/password combination

Username |  username

Password |  password

OAuth 2.0 - Authorization Codeoauth2OAuth 2.0 authorization using the authorization code grant type

Client ID |  client_id

Client Secret |  client_secret

Scopes |  scopes

Authorization URL |  auth_uri

Access Token URL |  token_uri

OAuth 2.0 - Client Credentialsoauth2_client_credentialsOAuth 2.0 authorization using the client credentials grant type

Client ID |  client_id

Client Secret |  client_secret

Access Token URL |  token_uri

Scopes |  scopes

This component can be configured to use optional Basic Auth (username/password), API Key, or OAuth 2.0 credentials to authenticate the request.

If Basic Auth credential is supplied, an Authorization: Basic ${base64(USERNAME:PASSWORD)} header is used in the HTTP request. If an API Key credential is supplied, an Authorization: Basic ${APIKEY} header is used in the HTTP request. If OAuth 2.0 credentials are supplied, an Authorization: Bearer ${KEY} header is used in the HTTP request, where KEY is the client key that is fetched from the OAuth provider.

For other non-standard authentication schemes, you will either need to supply your own Authorization as a header as an input to the HTTP component, or you can create your own custom component to interact with an HTTP-based API.

Actions#

DELETE request#

Issue a HTTP DELETE request | key: httpDelete

InputKeyDefaultNotesExample

Header

string
headersA list of headers to send with the request.User-Agent: curl/7.64.1

Max Retry Count

string
maxRetries0The maximum number of retries to attempt.

Query Parameter

string
queryParamsA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

string
responseTypejsonThe type of data you expect in the response. You can request json, text, or binary data.binary

Retry Delay (ms)

string
retryDelayMS0The delay in milliseconds between retries.

Retry On All Errors

boolean
retryOnAllErrorsfalseIf true, retries on all erroneous responses regardless of type.

URL

string
/ Required
urlThis is the URL to call.https://api.company.com/endpoint

Use Exponential Backoff

boolean
useExponentialBackofffalseSpecifies whether to use a pre-defined exponential backoff strategy for retries.

Output Example Payload#

{  "data": null,  "contentType": "application/json"}

GET Request#

Issue a HTTP GET request | key: httpGet

InputKeyDefaultNotesExample

Header

string
headersA list of headers to send with the request.User-Agent: curl/7.64.1

Max Retry Count

string
maxRetries0The maximum number of retries to attempt.

Query Parameter

string
queryParamsA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

string
responseTypejsonThe type of data you expect in the response. You can request json, text, or binary data.binary

Retry Delay (ms)

string
retryDelayMS0The delay in milliseconds between retries.

Retry On All Errors

boolean
retryOnAllErrorsfalseIf true, retries on all erroneous responses regardless of type.

URL

string
/ Required
urlThis is the URL to call.https://api.company.com/endpoint

Use Exponential Backoff

boolean
useExponentialBackofffalseSpecifies whether to use a pre-defined exponential backoff strategy for retries.

Output Example Payload#

{  "data": null,  "contentType": "application/json"}

PATCH request#

Issue a HTTP PATCH request | key: httpPatch

InputKeyDefaultNotesExample

Data

string
/ Required
dataThe HTTP body payload to send to the URL. Must be a string or a reference to output from a previous step.{"exampleKey": "Example Data"}

Header

string
headersA list of headers to send with the request.User-Agent: curl/7.64.1

Max Retry Count

string
maxRetries0The maximum number of retries to attempt.

Query Parameter

string
queryParamsA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

string
responseTypejsonThe type of data you expect in the response. You can request json, text, or binary data.binary

Retry Delay (ms)

string
retryDelayMS0The delay in milliseconds between retries.

Retry On All Errors

boolean
retryOnAllErrorsfalseIf true, retries on all erroneous responses regardless of type.

URL

string
/ Required
urlThis is the URL to call.https://api.company.com/endpoint

Use Exponential Backoff

boolean
useExponentialBackofffalseSpecifies whether to use a pre-defined exponential backoff strategy for retries.

Output Example Payload#

{  "data": null,  "contentType": "application/json"}

POST Form Data Request#

POST data as multipart/form-data. Often useful for uploading binary data. | key: httpPostFormData

InputKeyDefaultNotesExample

File Data

string
fileDataFile Data to be sent as a multipart form upload.[{key: "example.txt", value: "My File Contents"}]

Form Data

string
formDataThe Form Data to be sent as a multipart form upload.[{"key": "Example Key", "value": new Buffer("Hello World")}]

Header

string
headersA list of headers to send with the request.User-Agent: curl/7.64.1

Max Retry Count

string
maxRetries0The maximum number of retries to attempt.

Query Parameter

string
queryParamsA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

string
responseTypejsonThe type of data you expect in the response. You can request json, text, or binary data.binary

Retry Delay (ms)

string
retryDelayMS0The delay in milliseconds between retries.

Retry On All Errors

boolean
retryOnAllErrorsfalseIf true, retries on all erroneous responses regardless of type.

URL

string
/ Required
urlThis is the URL to call.https://api.company.com/endpoint

Use Exponential Backoff

boolean
useExponentialBackofffalseSpecifies whether to use a pre-defined exponential backoff strategy for retries.

The Post Form Data Action takes two possible inputs for data to be uploaded to an endpoint.

  • Form Data are key/value pairs. For example, "username"/"Groucho" and "accountnum"/12345. Values are turned into strings if they are not already. For more information see https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
  • File Data is similar to form data but allows you to upload file contents. A filename property is automatically generated from the key. This should be used to upload files only. All other types of data should go through the Form Data Input.

POST Request#

Issue a HTTP POST request | key: httpPost

InputKeyDefaultNotesExample

Data

string
/ Required
dataThe HTTP body payload to send to the URL. Must be a string or a reference to output from a previous step.{"exampleKey": "Example Data"}

Header

string
headersA list of headers to send with the request.User-Agent: curl/7.64.1

Max Retry Count

string
maxRetries0The maximum number of retries to attempt.

Query Parameter

string
queryParamsA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

string
responseTypejsonThe type of data you expect in the response. You can request json, text, or binary data.binary

Retry Delay (ms)

string
retryDelayMS0The delay in milliseconds between retries.

Retry On All Errors

boolean
retryOnAllErrorsfalseIf true, retries on all erroneous responses regardless of type.

URL

string
/ Required
urlThis is the URL to call.https://api.company.com/endpoint

Use Exponential Backoff

boolean
useExponentialBackofffalseSpecifies whether to use a pre-defined exponential backoff strategy for retries.

Output Example Payload#

{  "data": null,  "contentType": "application/json"}

PUT request#

Issue a HTTP PUT request | key: httpPut

InputKeyDefaultNotesExample

Data

string
/ Required
dataThe HTTP body payload to send to the URL. Must be a string or a reference to output from a previous step.{"exampleKey": "Example Data"}

Header

string
headersA list of headers to send with the request.User-Agent: curl/7.64.1

Max Retry Count

string
maxRetries0The maximum number of retries to attempt.

Query Parameter

string
queryParamsA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

string
responseTypejsonThe type of data you expect in the response. You can request json, text, or binary data.binary

Retry Delay (ms)

string
retryDelayMS0The delay in milliseconds between retries.

Retry On All Errors

boolean
retryOnAllErrorsfalseIf true, retries on all erroneous responses regardless of type.

URL

string
/ Required
urlThis is the URL to call.https://api.company.com/endpoint

Use Exponential Backoff

boolean
useExponentialBackofffalseSpecifies whether to use a pre-defined exponential backoff strategy for retries.

Output Example Payload#

{  "data": null,  "contentType": "application/json"}