HTTP Request
Description
Sends an HTTP request to an API and exposes its response, status, headers, cookies, and any downloaded files. Use it to retrieve or submit data without browser automation.
Configure the request
| Property | Description |
|---|---|
| Display Text | Name shown on the canvas. |
| Host | Required endpoint URL. Use placeholders such as https://api.example.com/orders/{id} with URL Segments. |
| Method | GET, POST, PUT, DELETE, HEAD, OPTIONS, or PATCH. Default: GET. |
| Accept Format | Desired response format. Default: JSON. This does not force a server to return valid JSON. |
| Timeout | Maximum request wait in seconds. Default: 10; minimum: 1. |
| Output Format | Parse Result as JSON or return response text. Select text for a non-JSON body. |
Set the expected authentication and request fields before choosing the response parsing mode.
URL Segments, Query Params, Headers, and Cookies
Add name/value entries and bind their values from Process Data when needed.
- URL Segments replace placeholders in Host. For
/orders/{id}, add an entry namedid. - Query Params append query values to the URL.
- Headers supply values such as an API's custom request headers.
- Cookies supply request cookies.
Use the authentication controls for their supported credential types rather than building duplicate authorization values in several places.
Authentication Type
| Type | Configuration |
|---|---|
| No Authentication | No authentication fields are required. |
| Basic Authentication | Username and Password. |
| OAuth 1.0 | Consumer Key, Consumer Secret, Signature Method, Token, and Token Secret. |
| OAuth 2.0 | Token and Header Prefix, such as Bearer. |
| Windows Authentication | Domain Name, Domain Username, and Password. |
Supply credentials for the target API and select the matching type. A saved or dynamically bound token must be valid when the request executes.
Body
| Body mode | What to configure |
|---|---|
| none | No request body. |
| raw | Body text and Body Format, such as JSON or plain text. Supply correctly serialized content for that format. |
| form-data | Parameters containing text or file fields. The request is multipart/form-data. |
| x-www-form-urlencoded | Url Encoded Params containing the form's name/value pairs. |
For a multipart file parameter, select the Files parameter type and bind a file-reference collection. Use Add To Collection when only one file reference is available. The request reads the file bytes through the source provider; a Base64 string or file ID alone is not the same as a file reference.
Download response files
Set Target Folder when a downloadable response must be saved. Configure If File Exists to overwrite, create a copy, or report a conflict. After success, Files contains references to the saved files: one item for a single-file response, or one per detected multipart file part.
Files is empty when no downloadable file is detected or no target folder is supplied. Choose the output parsing format for any accompanying response body.
Outputs
| Output | Description |
|---|---|
| Result | Parsed response body or text, according to Output Format. |
| Status Code | HTTP response status as an integer. A value of 0 means no HTTP response status was received; it is not a status sent by the server. |
| Error Message | Transport or request error information, where supplied. |
| Raw Response Headers | Response headers serialized as a JSON string. |
| Raw Response Cookies | Response cookies serialized as a JSON string. |
| Files | Collection of saved response-file references. |
Inspect Status Code as well as Result. An HTTP error response can contain a valid body; parsing that body does not establish success. Handle activity exceptions through On Error, and check Error Message for transport failures.
Example: Read an order
- Set Host to
https://api.example.com/orders/{id}and Method to GET. - Add URL Segments with name
idand bind the order identifier from Process Data. - Configure the authentication expected by your API.
- Select Accept Format = JSON and JSON output parsing. Set Timeout for the expected request duration.
- Run against a test endpoint. Check for the expected successful status, then bind fields from Result to downstream activities.
For a JSON POST, choose POST, Body = raw, and JSON Body Format, then supply a valid JSON body. Replace the illustrative host with your actual API endpoint.
Execution settings
See Execution Control. Before configuring retries, consider whether repeating a POST or other write request could repeat its remote side effects.