Map Local
Map Local intercepts a matching URL and serves a local response — status code, headers, and body — without ever contacting the origin. Use it to stub a third-party API your app depends on, force an error path (a 500, a malformed JSON, an empty array), or keep working when the upstream is offline. The request is short-circuited inside Probe; nothing leaves your machine.
Map Local is the partner of Map Remote: one fakes the response, the other rewrites the destination. See the comparison at the bottom of this page if you’re choosing between them.
How a rule matches
Section titled “How a rule matches”Each rule has a URL pattern, an optional HTTP method filter, and a response body. A request matches when:
- the method matches (or Match all methods is on), and
- the URL matches the pattern, where
*is a wildcard that consumes any substring.
Probe normalizes the request URL before matching: the MITM-injected default port (:443 for HTTPS, :80 for HTTP) is stripped, so you can write patterns either way. https://api.example.com/v1/users and https://api.example.com:443/v1/users both match the same captured request.
A pattern with no * is a strict equality check (case-insensitive). * matches any substring (including empty) and is anchored at both ends, so https://api.example.com/v1/* matches any path under /v1/ on that host.
Response source
Section titled “Response source”A rule serves its body from one of two sources:
- Inline body — type the response directly into the editor. Pick a format (JSON, text, HTML, XML, JS, CSS) and Probe sets a sensible
Content-Typefor you. - Local file — point at a file on disk. Probe streams it as the response body and infers
Content-Typefrom the extension. Useful for large fixtures, binary blobs, and anything you’d rather edit in your real editor.
You also set:
- a status code (default
200), - arbitrary response headers as a key/value list,
- an enabled toggle per rule, plus a master toggle that disables every rule at once.
See the Map Local editor for the full set of options.
Quick-create from the log table
Section titled “Quick-create from the log table”The fastest way to build a Map Local rule is to capture the request first, then turn the real response into a fixture:
- Right-click any row in the log table and choose Create Map Local rule.
- The editor opens pre-filled with the request’s method, URL, status, and response body — exactly what came back from the real server.
- Edit anything you want to change (flip a
200to a500, blank out a field), tick Enable, and save.
From now on, that endpoint serves your edited copy. Toggle the rule off when you want the real upstream back.
You can also create rules from scratch in the Map Local manager — open it from the toolbar or the right-side toolbar cluster.
Worked example: stub a third-party API
Section titled “Worked example: stub a third-party API”Your app calls https://api.stripe.com/v1/charges and you want every call to look like a successful charge — without hitting Stripe.
- URL pattern:
https://api.stripe.com/v1/charges* - Method:
POST - Status:
200 - Body (inline, JSON):
{ "id": "ch_test_local", "status": "succeeded", "amount": 1000 }Save and enable. Every POST to /v1/charges (with or without query string) now returns your fake charge. Flip the rule off to go back to real Stripe traffic.
Map Local vs Map Remote
Section titled “Map Local vs Map Remote”| Map Local | Map Remote | |
|---|---|---|
| Hits the origin? | No | Yes — a different one |
| Body comes from? | Inline editor or local file | The rewritten upstream |
| Status / headers | You set them | The rewritten upstream sets them |
| Use case | Mocks, error injection, offline dev | Point at staging, swap CDN for origin, send to localhost |
If you want to fake a response, use Map Local. If you want a real response from a different server, use Map Remote.
Related
Section titled “Related”- Map Remote — rewrite the URL instead of mocking the response.
- Breakpoints — pause and edit a single request without persisting a rule.
- Scripting — modify requests and responses programmatically.
- Quick Tour — where Map Local lives in the toolbar.