Skip to main content
Browser

API request

API request

Makes an HTTP request from inside the browser's context, so you can call REST APIs with GET, POST, PUT, PATCH and DELETE. Because it runs in the browser's context, it carries the page's active cookies and sessions.


Options

Browser ID

The browser opening action whose context the request runs in.

Request URL

The API's full address.

HTTP method

The request's method: GET, POST, PUT, DELETE or HEAD.

Headers

The HTTP headers sent with the request, as key-value pairs.

Request body

The request's body, used by POST, PUT and PATCH. It takes JSON or plain text. Ignored by GET and DELETE.

Returns

Javascript code

js
actions["action-id"].value // the HTTP request's complete response (Code)

Field selection

  • value — the HTTP request's complete response (Code)

Rules and conditions

  • Browser or page ID and URL are both required.
  • value holds the API's response body, usually JSON.
  • If the request fails, or comes back with an HTTP error code, the action ends in an error.