Send a request to localhost from your browser
Test an API on your own machine or network with the {{brand}} browser extension.
In short
{{brand}} sends requests from its own servers, which cannot reach your laptop or office network. A request to localhost or a private address is recorded as "Not sent" - not a failure. "Send from my browser" sends it from your own browser through the {{brand}} extension instead.
Before you start
- Who: signed in, with Run on the project (or a quick request). The extension must be installed in your browser.
- Plan: a Browser run never counts against your plan.
- First: install the browser extension (see /help/settings/browser-extension).
Steps
- Install the {{brand}} browser extension. The first press of "Send from my browser" offers it if it is missing.
- Press "Send from my browser" under the Not sent message.
- The first time for each address, click the extension's icon and approve that host. Then press "Send from my browser" again.
Result: the answer comes back to the page and is recorded as a Browser run. Secrets and personal data are masked, your saved checks judge it, and it never counts against your plan.
Good to know
- Addresses that are not sent: localhost, private network addresses, and names such as .local or .internal. Not sent never turns a request red.
- You have four ways on. One is "Send from my browser". Another is "Send through my agent" (/help/api-testing/cli-agent). The others are "Copy as cURL", and "Use a public URL", which points the request at a public copy of your API.
- A Browser run is your browser's word. It does not change a request's passed or failed state on boards, Home or verification, and is never evidence that {{brand}} tested the API.
- {{brand}} refuses to record a run for a public address as a Browser run - use Send for those.
Secrets stay on the server
Before your browser sends anything, {{brand}} fills in the request's variables the way a normal run does. A secret's value never leaves the server except in a request the server sends itself, so the page has only a mask for it.
- If the address, a header or the body uses a secret variable, nothing is sent. The message names the variable, such as {{token}}. Send it from {{brand}} instead, or use a variable that is not secret for your local copy.
- A variable nothing defines, or one that only gets its value while {{brand}} runs the request, is never sent as literal text either.
- Copy as cURL writes the request with its placeholders, so fill them in yourself.
If something goes wrong
- Nothing happens after "Send from my browser": approve the host in the extension's icon, then press it again.
- "Only a request to a local or private address is sent from your browser; this one goes through" {{brand}}: press Send instead.
- The message names a secret variable: nothing is sent while the request uses one.
Related
- /help/api-testing/cli-agent
- /help/settings/browser-extension
- /help/api-testing/variables