Mock an API response without changing your code
Serve a local JSON file in place of a real API response on macOS, to test empty states, errors and unreleased endpoints without touching your app or server.
Last updated 29 October 2026
Testing an empty list, a 500 error or a field the backend has not shipped yet usually means editing code or waiting on someone else. With a debugging proxy you can swap the response on its way to your app instead. The app, web page or simulator never knows.
The fast way: Map Local from a real request (PRO)
- Install MinPin, trust its certificate, and enable SSL decoding for your API host (right-click a request → Enable SSL).
- Trigger the request once so it is captured.
- Right-click it and choose Map Local…. MinPin creates a rule with the request's URL and Content-Type, and saves the current response body to a file.
- Edit that file in any editor: empty the array, change a field, break the JSON on purpose.
- Run the request again. Your app now receives the file's contents.
Rules live in Tools → Map Local… (⌘⌥L), where you can match a URL prefix or a pattern with *, and switch rules on and off. If the mapped file goes missing, MinPin answers with a 502 instead of hanging, so the mistake is obvious.
Other ways to change a response
| You want to… | Use |
|---|---|
| Change one response, once, by hand | Breakpoints: pause it, edit the status, headers or body, continue |
| Change a header or a string on every response | Rewrite Rules |
| Send production requests to staging or localhost | Map Remote |
| Test a slow or failing network | Throttling and the Block List |
TipIf you use an AI coding assistant, it can create the mock for you over MCP: see Let Claude Code, Cursor or VS Code read your HTTP traffic.
Try itMinPin is free to download, with full capture and SSL decoding in 30-minute sessions. Download MinPin (macOS 12+, Apple Silicon and Intel) or see what PRO adds.