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)

  1. Install MinPin, trust its certificate, and enable SSL decoding for your API host (right-click a request → Enable SSL).
  2. Trigger the request once so it is captured.
  3. 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.
  4. Edit that file in any editor: empty the array, change a field, break the JSON on purpose.
  5. 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 handBreakpoints: pause it, edit the status, headers or body, continue
Change a header or a string on every responseRewrite Rules
Send production requests to staging or localhostMap Remote
Test a slow or failing networkThrottling 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.