REST Helper

Build a request, send it from the server, and read the response as plain text, raw bytes, formatted JSON, or a compact summary written for an LLM — with history, collections, and a cookie jar kept in your browser.

Overview

REST Helper is a Postman-style tile for investigating HTTP endpoints on and around your server: build a request, send it, and read the response in whichever view helps — plain text, raw bytes, formatted JSON, or a compact summary written for an LLM.

The request is executed by the Suwu server, not by your browser. That is the point: a browser page cannot fetch arbitrary hosts (CORS, and Suwu's own connect-src policy), but the server can — so the helper reaches localhost, LAN hosts, and services behind your own auth, exactly the things you would otherwise have to curl in a second terminal.

Building a Request

  • Method — GET, POST, PUT, PATCH, DELETE, HEAD, or OPTIONS.
  • URL and query parameters — the query string is parsed into an editable table on blur, and editing the table rewrites the URL. Values are encoded for you.
  • Headers — a table where each row can be enabled or disabled. Duplicate keys are preserved, which matters for Set-Cookie, repeated Accept values, and custom headers that appear twice.
  • Body — none, json, raw, form-data (text plus base64 file parts), or x-www-form-urlencoded.

Sending

  • Ctrl/Cmd+Enter sends the request.
  • Esc cancels a request in flight — the outbound HTTP call is aborted with it.

An HTTP 4xx or 5xx is a valid response, exactly like in a desktop client. Transport failures (DNS, refused connection, TLS, timeout) come back as a normal envelope with status: 0 and a readable error kind, so the tile always has one response shape to render.

Reading the Response

The response pane has five tabs — Body, LLM, Status, Headers, and Request — and the Body tab switches between four views:

View What you get
Auto Picks the best renderer for the content type: formatted JSON, image preview, HTML, or a binary download.
Plain text The decoded body, wrapped and selectable.
Raw Unformatted and unwrapped — byte-exact for text, base64 for binary.
JSON Pretty-printed in a read-only editor with folding. Selected automatically for application/json.
LLM A compact markdown summary — method, final URL, status, duration, size, then the request and response headers and bodies. Bodies are truncated around 10 KB on purpose: the goal is a token-friendly payload. Copy for LLM puts it on the clipboard.

The status bar under the response shows status, elapsed time, body size, and whether the body was truncated. Copy and Download are always available, and Copy as cURL turns the current request into a command you can paste into a terminal.

History, Collections, and Cookies

Everything the helper remembers lives in your browser's IndexedDB, not on the server — the backend is stateless.

  • History — every sent request, with its result. Re-open one to restore it, or duplicate it into a fresh request without the old response attached.
  • Collections — save requests into folders and reuse them. Saved requests are the only ones persisted with their headers, so treat saved Authorization values as secrets.
  • Cookies — a cookie jar that captures Set-Cookie from responses and attaches matching cookies to later requests. An explicit Cookie header always wins. You can also import the current origin's browser cookies, edit them by hand, or paste a cookie string for another host.

JavaScript can only read cookies for the Suwu origin itself, so cookies belonging to other domains cannot be lifted from the browser — paste them instead.

Request Options

  • User-Agent mode — use the server default, replicate the browser's, or send a custom value.
  • Timeout — bound how long a request may take.
  • Redirects — follow or surface them.
  • TLS verification — can be turned off for a local development server with a self-signed certificate.
  • Cookies — capture responses into the jar, and attach the jar on send.

Tips

  • Pair it with a shell. The tile shows the request that was sent, so when a response surprises you, the Request tab is the fastest way to turn it into a curl command you can iterate on.
  • Hand responses to an agent. The LLM view is deliberately token-efficient — pipe it into a prompt instead of pasting a wall of JSON.
  • Save before you experiment. Collections are the cheapest way to keep a working request around while you change one header at a time.
  • DB Browser — the same shape, pointed at a database instead of an HTTP endpoint.
  • Security & Access — the tile is behind the session token, like every other app.