HTTP Request
The HTTP Request node is one of the most versatile nodes in Studio. It allows you to make HTTP requests which can be used to query data from apps and services.
!!! note "Credential" You can find authentication information for this node here.
Node Reference
- Authentication: Select the authentication method to use for the request from the following:
- Basic Auth
- Digest Auth
- Header Auth
- OAuth1
- OAuth2
- None
- Request Method: Select the method to be used for the request:
- DELETE
- GET
- HEAD
- PATCH
- POST
- PUT
- URL: This field is where the URL to request has to be entered.
- Ignore SSL Issues: This option can be used to download the response even if SSL validation is not possible.
- Response Format: Select the format in which the data gets returned from the URL. You can choose between File, JSON, and String.
- JSON/RAW Parameters: This option can be used to specify whether the body/query parameter should be set via the value-key pair UI or JSON/RAW.
- Options
- Batch Interval: The time (in milliseconds) between each batch of requests. Set to
0
to disable. - Batch Size: If set, input will be split in batches to throttle requests. Use
-1
to disable.0
will be treated as1
. - Full Response: This option can be used to retrieve the full response instead of only the body from the URL.
- Follow Redirect: This option can be used to follow any redirections with a status code
3xx
. - Ignore Response Code: This option can be used to let the node execute even when the HTTP status code is not 2xx.
- Proxy: This field is used to specify an HTTP proxy that you may want to use.
- Split Into Items: This option can be used to flatten the node output as a simple array. See the FAQ section to learn more.
- Timeout: The maximum time (in ms) to wait for a response header from the server before aborting the request.
- Use Querystring: Set this option to
true
if you need arrays to be serialized asfoo=bar&foo=baz
instead of the defaultfoo[0]=bar&foo[1]=baz
. - Headers: This section is used to specify any optional HTTP request headers you may want to include with your request.
- Query Parameters: This section is used to specify any HTTP query parameters you may want to include with your request.
- Batch Interval: The time (in milliseconds) between each batch of requests. Set to
Example Usage
1. Start node
The start node exists by default when you create a new workflow.
2. HTTP Request node (GET)
- Enter
https://reqres.in/api/users
in the URL field. - Click on Execute Node to run the workflow.
3. HTTP Request1 node (POST)
- Select 'POST' from the Request Method dropdown list.
- Enter
https://reqres.in/api/users
in the URL field. - Click on the Add Parameter button in the Body Parameters section.
- Enter
name
in the Name field. - Enter
Neo
in the Value field. - Click on the Add Parameter button in the Body Parameters section.
- Enter
job
in the Name field. - Enter
Programmer
in the Value field. - Click on Execute Node to run the workflow.
4. HTTP Request2 node (PATCH)
- Select 'PATCH' from the Request Method dropdown list.
- Enter
https://reqres.in/api/users/2
in the URL field. - Click on the Add Parameter button in the Body Parameters section.
- Enter
name
in the Name field. - Enter
Neo
in the Value field. - Click on the Add Parameter button in the Body Parameters section.
- Enter
job
in the Name field. - Enter
The Chosen One
in the Value field. - Click on Execute Node to run the workflow.
FAQs
How to fetch a binary file from a URL?
- Select 'File' from the Response Format dropdown list.
- (Optional) Change the binary property value in the Binary Property field. Throughout the workflow, you can refer to the binary data with the value you set in this field.
- Click on Execute Node to run the node.
- After the node gets executed, click on the Binary tab.
- Click on the Show Binary Data button to view the file.
How to send a binary file to an API endpoint?
Depending on your use-case, you might want to send a binary file to an API endpoint. To do that, follow the steps mentioned below.
- Connect the HTTP Request node with a node that has previously fetched the binary file. This node can be an HTTP Request node, Read Binary File node, Google Drive node or any such node.
- Select 'POST' from the Request Method dropdown list (Note: Refer to the API documentation of your API to make sure that you have selected the correct HTTP request method).
- Enter the URL where you want to send the binary file in the URL field.
- Toggle JSON/RAW Parameters to
true
. - Toggle Send Binary Data to
true
. - Click on Add Option and select 'Body Content Type' from the dropdown list.
- Select 'Form-Data Multipart' from the Body Content Type dropdown list.
- If you are referring to the binary property with a different value, enter that value in the Binary Property field (name displayed in the binary tab after executing the previous node).
Note: To set a name for the form field, separate the field name with a colon, example
sendKey:binaryProperty
. If you want to send multiple files, separate them with comma, example:sendKey1:binaryProperty1,sendKey2:binaryProperty2
- Click on Execute Node to run the node.
How to get the HTTP status code after an execution?
- Click on Add Option and select 'Full Response'.
- Toggle Full Response to
true
.
When the node gets executed, you will receive the HTTP status code, the HTTP status message, and the header parameters.
How to send XML data?
- Toggle JSON/RAW Parameters to
true
. - Click on Add Option and select 'Body Content Type'.
- Select 'RAW/Custom' from the Body Content Type field.
- Enter the XML data in the Body field.
When to use the Split Into Items parameter?
Not all incoming data you receive will be properly structured to allow nodes to process each individual item.
Typically you would need to use the Item List node to modify data structure. The HTTP Request node allows you to do this automatically by enabling the Split Into Items parameter.