Mock Server
The Mock Server boots a local HTTP server directly from a .mock file. Declare routes, match rules, and templated responses in plain text — save the file and your teammates can run the exact same mock with git pull.
Quick example
Section titled “Quick example”@port = 3500@cors = permissive
### GET /users/:idHTTP/1.1 200 OKContent-Type: application/json
{ "id": {{param.id}}, "name": "Jane", "createdAt": "{{now}}" }
### POST /users# @match method = POST# @status 201# @delay 150msContent-Type: application/json
{ "id": "{{uuid}}", "name": "{{body.name}}" }Press ⌘Enter or click ▶ at the top of the file. The Mock panel shows Running on :3500 — point any HTTP client at http://localhost:3500.
Starting, stopping, reloading
Section titled “Starting, stopping, reloading”⌘Enteror the ▶ button starts the server.- Save the file (
⌘S) — the server auto-reloads instantly. In-flight requests finish against the old definition; new requests hit the new one. - Click Stop in the Mock panel to tear it down. Closing the file also stops the server.
Match rules
Section titled “Match rules”Routes match on path, method, query, headers, and body. Combine as many as you need:
### Authenticated list# @match method = GET# @match path = /users# @match header.authorization contains Bearer# @match query.page = 1HTTP/1.1 200 OKContent-Type: application/json
{ "data": [], "page": 1 }See the .mock reference for the full directive list.
Templates
Section titled “Templates”Response bodies support request-aware template variables:
{{param.id}},{{path.0}}— path params and segments{{query.<name>}}— query-string values{{header.<name>}}— incoming headers{{body.<json-path>}}— fields from a JSON body{{uuid}},{{now}},{{random(0,100)}}— built-ins
Forwarding (Pro)
Section titled “Forwarding (Pro)”Point unmatched requests at a real upstream — perfect for stubbing just the endpoint you care about:
@port = 3500@forward = https://api.prod.example.com
### Flag this endpoint as enabled for testing# @match path = /v1/features/betaHTTP/1.1 200 OK
{ "feature": "enabled" }Everything else streams through to the upstream and is logged with a forwarded badge.
Live request log
Section titled “Live request log”The Mock panel shows every incoming request in real time with the matched route, status, duration, and templated body. Click any row to inspect the full request/response pair.
Free vs Pro
Section titled “Free vs Pro”| Capability | Free | Pro |
|---|---|---|
Author .mock files | ✓ | ✓ |
| Start a server with up to 3 routes | ✓ | ✓ |
| Unlimited routes | — | ✓ |
@forward upstream proxy | — | ✓ |
@repeat, advanced @template vars | — | ✓ |