Features

Collections

Save requests into named collections for reuse. Collections appear in the sidebar and persist in IndexedDB.

  • Save — Press Cmd+S to save the current request
  • Organize — Drag and drop to reorder requests within a collection
  • Context menu — Right-click a request to duplicate, rename, or delete it
  • Load — Click any saved request to open it in a new tab

Environments & Variables

Define named sets of key-value variables and reference them anywhere with {{variableName}} syntax — in URLs, headers, body, params, and auth fields.

Creating Environments

Open the Environments panel in the sidebar. Create environments like “Development”, “Staging”, and “Production” with different base URLs, API keys, or tokens.

Switching

Only one environment is active at a time. Click the environment selector in the toolbar to switch. Variables resolve instantly.

Visual Indicators

  • Variables that resolve successfully appear in amber
  • Unresolved variables appear in red

Disabling Variables

Toggle individual variables on/off without deleting them — useful for temporary debugging.

Authentication

Rex supports 7 authentication methods, configured in the Auth tab:

MethodDescription
Bearer TokenToken in the Authorization header
Basic AuthBase64-encoded username:password
API KeyKey sent as a header or query parameter
OAuth 2.0Authorization Code, Client Credentials, and PKCE grant types with automatic token refresh
AWS Signature V4Request signing for AWS services
Digest AuthChallenge-response authentication with automatic retry
mTLSMutual TLS authentication

OAuth 2.0 tokens are tracked with expiration times and refreshed automatically before they expire.

Body Editor

The Body tab supports multiple content types:

TypeUse Case
JSONAPI payloads with syntax highlighting and formatting
Form DataMultipart form submissions with file uploads
URL-EncodedStandard HTML form encoding
RawPlain text or any custom content type
GraphQLQuery editor with variables pane and introspection
NoneNo body (GET, HEAD requests)

The editor uses Monaco (the VS Code editor engine) for syntax highlighting, formatting, and auto-complete.

Pre-Request & Test Scripts

Write JavaScript in the Scripts tab to run before sending (pre-request) or after receiving a response (test).

Pre-Request Scripts

Modify the request before it’s sent:

rex.request.headers.set("X-Request-ID", crypto.randomUUID());
rex.environment.set("timestamp", Date.now().toString());

Test Scripts

Assert on the response and extract values:

rex.test("Status is 200", rex.response.status === 200);

const data = rex.response.json();
rex.test("Has user ID", data.id !== undefined);
rex.variables.set("userId", data.id);

Available API

ObjectScopeMethods
rex.requestPre-request.url, .method, .headers.get/set, .body
rex.responseTest only.status, .json(), .headers
rex.environmentBoth.get(key), .set(key, value)
rex.variablesBoth.get(key), .set(key, value)
rex.testTest only(name, assertion) — report pass/fail

Scripts have a 5-second timeout. Logs, warnings, and errors are captured and displayed.

Request Chaining

Build sequences of dependent API requests in the Chains panel:

  1. Create a chain and add steps (each step references a saved request)
  2. Configure variable overrides per step
  3. Add pre-request and test scripts to extract values
  4. Set failure handling: stop, skip, or retry (with configurable attempts)
  5. Run the chain and watch real-time progress with pass/fail indicators

Chains are useful for workflows like: authenticate → create resource → verify creation → clean up.

WebSocket

Connect to WebSocket endpoints (ws:// and wss://) from the request builder:

  • Send and receive messages in real-time
  • View a timestamped message log with direction badges (sent/received)
  • Support for subprotocols
  • Binary message handling
  • Connection state indicators (connecting, connected, error)

Server-Sent Events

Connect to SSE endpoints to watch events arrive in real-time:

  • Event type and payload display
  • Timestamps on each event
  • Auto-scroll with manual override
  • Expandable event details

GraphQL

Switch the body type to GraphQL for a dedicated editing experience:

  • Query editor with syntax highlighting
  • Variables pane (JSON format)
  • Operation name selector
  • Schema introspection — Rex fetches the schema from the endpoint and provides autocomplete for types, fields, queries, mutations, and fragments

Response Viewer

Responses are rendered based on content type:

Content TypeRendering
JSONSyntax highlighted with line numbers and auto-formatting
HTMLInline iframe preview + raw source view
ImagesInline display with dimensions
PDFBuilt-in PDF viewer
XMLAuto-formatted with indentation
BinaryHex dump with download option

Status codes are color-coded: green (2xx), blue (3xx), amber (4xx), red (5xx).

History & Diff

Every request is automatically logged in the History panel with the full request and response.

  • Search by URL, method, or status code
  • Filter by time range
  • Diff — Select any two history entries to compare body, headers, and status side by side with line-by-line change highlighting

DevTools Integration

Rex appears as a panel in Chrome DevTools (F12):

  1. Open DevTools on any page
  2. Switch to the Rex tab
  3. Browse the page — captured network requests appear in the panel
  4. Click Send to Rex to load a request into the main app
  5. Or select multiple requests and Import as Collection

Filter captured requests by type (XHR/Fetch only or all) and search by URL.