Desktop vs browser API clients: which fits your team

An API client in a browser tab and one in a desktop app look the same. They aren't. A browser enforces rules on every request a page makes, and those rules decide which APIs you can test, which headers you can set and whether localhost works at all.

This post explains the differences, so you know which one your team needs, or whether you need both.

What a browser won't let a page do

A web-based API client is a web page. Whatever it sends goes through the browser, which applies the same rules as for any site:

RuleWhat it means for API testing
CORSThe API must answer with Access-Control-Allow-Origin for the client's origin, or the browser hides the response. Your API is often not set up for that, and it shouldn't have to be.
Forbidden headersA page can't set Cookie, Origin, Host, User-Agent in some browsers, Content-Length and others. Tests that need them can't run.
Set-CookieA page can't read it. Session-based APIs are hard to test.
Mixed contentAn https page can't call http:// APIs.
Private networkCalls from a public site to localhost or 10.x addresses are blocked or need extra permission.
CertificatesYou can't skip a self-signed certificate or send a client certificate for mutual TLS.

Browser clients work around these with a proxy server (requests go from the vendor's server, so localhost is out) or a browser extension (most rules still apply).

What a desktop app can do

A desktop app makes its own network calls, not through a web page:

  • calls localhost, docker-compose services and hosts on your VPN;
  • sets any header, including Cookie and Origin;
  • reads Set-Cookie and keeps a real cookie jar;
  • skips TLS validation for one request, uses your company's CA, sends client certificates;
  • has no CORS at all, because there's no page origin.

The cost: something to install and keep updated.

How Requestarium does both

Requestarium has a desktop app for macOS, Windows and Linux and a web app. They share the same collections. In the web app, Settings ▸ Requests ▸ Send requests from decides how each request goes out:

  • Auto (default): localhost, private IP ranges and .local/.internal names go through Requestarium Desktop or the Requestarium agent when one runs; everything else goes through the Requestarium server.
  • Desktop Agent: everything goes through the desktop app or the agent. Use it for VPN hosts or to send cookies.
  • This browser: through the browser extension, with browser limits.
  • Requestarium server: everything from the server, public addresses only.

The agent is the CLI, run in the background:

Terminal
npm install -g @requestarium/cli
requestarium agent install   # starts at login; approve sites with: requestarium agent approve <code>

The first time the web app uses it, both show the same 4-digit code, so you can tell the request is yours. See test localhost APIs from the web app.

Which one fits your team

  • Mostly public APIs, quick checks, people who can't install software: a browser client is enough.
  • You test your own backend locally, behind a VPN, with cookies or client certificates: you need the desktop app, or a browser client with a local agent.
  • Mixed team: pick a tool where both work on the same collections, so QA in the browser and developers on the desktop see the same requests.

Don't forget the editor and the terminal

Many developers never open a separate app at all. The same collections open in VS Code and JetBrains IDEs, and run in CI with the CLI. All of them send from your machine, like the desktop app.