HTTP Send HTTP request function

Send an HTTP request (GET, POST, PUT, PATCH, DELETE) and store the response.

Help CentreBuilding Processes

This article describes the RPA HTTP functionality to send an HTTP request.

For a full list of available functions, please read HTTP functions.


Description

The Send HTTP request function executes an HTTP request (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) and stores the full response including status code, headers, body, elapsed time, final URL, and cookies.


Setting it up

To use the Send HTTP request function, follow these instructions:

{{popups:rpas/add:action=api-request}}

Once on a process map:

  1. Navigate to the process where you would like to add the Send HTTP request function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the Send HTTP request option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
NameNoTextdefaultThe alias of a previously created session (from api-session)
MethodNoSelect (GET / POST / PUT / PATCH / DELETE / HEAD / OPTIONS)GETThe HTTP method to use
URLYesText-The request URL (appended to session base_url if set)
HeadersNoJSON-Additional headers for this request (merged with session headers)
ParamsNoJSON-URL query parameters as key-value pairs
BodyNoJSON / Text-The request body
Body typeNoSelect (json / form / multipart / raw / xml)jsonThe encoding format for the request body
FilesNoJSON-Files to include in a multipart request
TimeoutNoNumber-Request timeout in seconds (overrides session timeout)
VariableNoTextresponseVariable name to store the response

Output variables

VariableTypeDescription
{response}ObjectThe response object containing: status_code (integer), headers (dictionary), body (parsed JSON or string), elapsed (seconds), url (final URL after redirects), cookies (dictionary)

Errors

ErrorDescription
Connection failedUnable to establish a connection to the server
TimeoutThe request exceeded the configured timeout
HTTP errorThe server returned an error status code (4xx or 5xx)

Tips

  • Use body_type=form for URL-encoded form data, body_type=json for JSON payloads
  • Always check response.status_code to verify the request succeeded
  • Use the params parameter for query strings instead of concatenating them into the URL
  • Create a session first (api-session) to avoid repeating auth and headers

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.