Skip to content

HTTP Interception

Guida can intercept HTTP requests before they leave the browser, letting you inspect headers and bodies, modify requests on the fly, mock responses, or replay captured requests with edits. It uses the browser’s built-in CDP Fetch domain — no proxy configuration or SSL certificates required.

Click Enable Intercept to start pausing all outgoing requests. Every request is held in a list until you decide what to do with it.

Intercept pane showing paused requests with detail panel, forward/drop/mock actions, and rules tab

The Intercept pane pauses matching browser requests so you can inspect headers and bodies before forwarding, dropping, or mocking them.

ActionShortcutWhat it does
ForwardFContinue the request to the server
DropDAbort the request
MockReturn a custom response without contacting the server
Forward + Intercept ↩Forward the request and pause the response when it arrives
Forward AllContinue all paused requests at once
Drop AllAbort all paused requests

Select a paused request to inspect its headers and body in the detail panel. The body is editable for POST/PUT requests.

To inspect a response body (a JS file, JSON API response, HTML page, etc.), click Forward + Intercept ↩ instead of Forward. The request is sent to the server and the list item transitions in place to show the response status, headers, and decoded body. You can then forward the response to the browser, drop it, or replace it with a mock.

Switch to the Rules tab to add persistent interception rules. Each rule has a URL glob pattern, an optional HTTP method filter, and an action:

ActionBehavior
PauseHold matching requests for manual review (same as the default)
ContinueLet matching requests pass through without pausing
BlockAbort matching requests with a network error
MockReturn a custom response for matching requests

Rules take priority over the default pause-all behavior. For example, adding a Continue rule for *.css lets stylesheets load normally while everything else is paused.

The HTTP Client pane lets you replay and modify captured requests — a built-in alternative to Postman or Insomnia.

HTTP Client pane showing request editor with method, URL, headers grid, and response viewer

The HTTP Client replays captured requests with editable method, URL, headers, body, and response history.

  1. Open the History pane and switch to the Network tab
  2. Right-click any request and choose Send to HTTP Client
  3. The pane opens with the method, URL, headers, and body pre-populated

Edit anything — change the method, tweak a header, modify the body — then click Send. The response appears in the bottom panel with status code, response time, headers, and body (JSON is automatically pretty-printed).

The dropdown in the bottom-right stores all previous sends. Select an entry to restore both the request parameters and its response, making it easy to compare across attempts.

The g.intercept.* namespace lets scripts control interception programmatically:

// Block ad/tracking requests during navigation
g.intercept.enable();
g.intercept.addRule("https://ads.example.com/*", { action: "block" });
g.intercept.addRule("https://tracking.example.com/*", { action: "block" });
await g.nav.navigateToUrl("https://example.com");
// Clean up when done
g.intercept.clearRules();
g.intercept.disable();
MethodDescription
g.intercept.enable()Turn on request interception
g.intercept.disable()Turn off interception and release all paused requests
g.intercept.isEnabled()Check if interception is active
g.intercept.addRule(pattern, options?)Add a rule, returns rule ID
g.intercept.removeRule(ruleId)Remove a specific rule
g.intercept.clearRules()Remove all rules
g.intercept.listRules()List active rules

Rules with action: "script" run a JavaScript file for each matching request. The script receives the request via g.intercept.getRequest() and decides what to do:

// intercept-handler.js — runs per-request
const req = g.intercept.getRequest();
// Add a custom header and continue
g.intercept.continue({
headers: { "X-Custom-Auth": "my-token" }
});
MethodDescription
g.intercept.getRequest()Get the paused request (URL, method, headers, body)
g.intercept.continue(options?)Forward with optional modified headers/URL
g.intercept.respond(status, headers?, body?)Return a mock response
g.intercept.abort(reason?)Abort the request