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.

This component can be configured to use optional Basic Auth (username/password), API Key, or OAuth 2.0 Connections to authenticate the request. 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.

Connections

API Key

If an API Key Connection is supplied, an Authorization: Basic ${APIKEY} header is used in the HTTP request.

OAuth 2.0 Authorization Code

If an OAuth 2.0 Connection 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.

Basic Username/Password

If a Basic Auth Connection is supplied, an Authorization: Basic ${base64(USERNAME:PASSWORD)} header is used in the HTTP request.

OAuth 2.0 Client Credentials

Actions

DELETE request

Issue a HTTP DELETE request | key: httpDelete

Output Example Payload

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

GET Request

Issue a HTTP GET request | key: httpGet

Output Example Payload

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

PATCH request

Issue a HTTP PATCH request | key: httpPatch

Output Example Payload

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

POST Request

Issue a HTTP POST request | key: httpPost

Output Example Payload

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

POST/PUT Form Data Request

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

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.

PUT request

Issue a HTTP PUT request | key: httpPut

Output Example Payload

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