RPABrowser
API Request
API Request
Makes an HTTP request from inside the browser's context, so you can call REST APIs with GET, POST, PUT, DELETE and HEAD. 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.
Select the request method
The request's method: GET (default), POST, PUT, DELETE or HEAD.
Select the credential type
Whether the browser session's cookies and credentials are sent with the request:
- include — always sent (default)
- same-origin — sent only when the URL is on the same domain as the open page
- omit — never sent
Request body
The request's body, used by POST, PUT and DELETE. It takes JSON or plain text. Leave it empty for GET and HEAD.
Request header
The HTTP headers sent with the request, as key-value pairs.
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 ID and Request 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.