Skip to main content
← Back to Tutorials

Mock Data: Intercept API Requests

Replace API responses with canned data during scans for deterministic results.

Video coming soon

Follow the written steps below in the meantime

Step-by-Step Instructions

  1. 1
    In the Test Config Builder, go to the Mocks tab.
  2. 2
    Add a URL pattern to match (e.g., "/api/users").
  3. 3
    Choose the HTTP method (GET, POST, etc.) and response status code.
  4. 4
    Enter the response body as JSON.
  5. 5
    Optionally add response headers.
  6. 6
    Download the config and upload it in the extension.
  7. 7
    During scans, matching fetch/XHR requests are intercepted and return your canned data.
  8. 8
    This gives deterministic, repeatable results — the same data every scan, regardless of backend state.