Sharing & Scaling

Record & Replay

Instead of hand-writing every route and response, point a mock at a real API and let it capture live traffic — then turn the requests you actually care about into permanent routes with one click.

Requires a signed-in account — free, not Pro-gated. Since this makes a real outbound request in your name, it's not available to anonymous mocks.

How it works

Set a target URL on the mock (Record & Replay panel). From then on, any request to your mock that doesn't match one of its own configured routes is proxied to that URL instead of returning a 404 — and the exchange (request in, response out) is captured.

This only kicks in for requests with no matching route. Once you've turned a captured exchange into a route of its own, later requests to that same method and path are served by the route directly, not proxied again.

Applying recordings

Open the list of captured exchanges and pick the ones you want to keep as routes. MockBase creates a route for each one, matching its exact method and path, with the captured response as the route's body. Response headers that don't make sense to replay verbatim (Content-Length, Set-Cookie, and similar) are stripped; an unusual status code falls back to 200.

Safety

The target URL is validated before every proxied request: MockBase resolves the hostname and refuses to connect to a private, loopback, link-local, or otherwise internal address, and never follows redirects from it. See Security for the full detail on how this and MockBase's other safety measures work.