How to change HTTP Response Status Code, Header, Or the Body for Testing
Here is what we achieve in this tutorial:
- Download and Setup Proxyman macOS / Windows / Linux
- Setup Breakpoint on the request
- ✅ Change the Response Status Code, Header, Or the Body on the fly for each incoming requests
The Breakpoint Tools is useful if you want to test the different responses for the same request without waiting for the server to return the response.

1. Download and Setup Proxyman
- Download Proxyman macOS / Windows / Linux from Proxyman website
- Install Proxyman
- Open Proxyman -> Certificate Menu -> Install Certificate for this Mac...
- Follow the instruction to install the certificate
- Verify the green checkmark on the Proxyman certificate

2. Setup Proxyman with your devices
It depends on what device you want to test on. We will list all requirements below:
2.1 iOS Devices
- Go to Certificate Menu -> Install Certificate on iOS -> Physical Devices
- Follow all steps to install & trust Certificate on your iOS devices
2.2 iOS Simulators
- Go to Certificate Menu -> Install Certificate on iOS -> Simulators...
- Follow all steps to install & trust Certificate on your iOS Simulators

2.3 Android Devices
- Go to Certificate Menu -> Install Certificate on Android -> Physical Devices
- Follow all steps to install & trust Certificate on your Android devices
2.4 Android Emulators
- Go to Certificate Menu -> Install Certifiicate on Android -> Emulators...
- Follow all steps to install & trust Certficate on your Android Emulators

2.5 NodeJS / Python / Golang / Ruby / PHP / ...
- For Backend Testing, it's very simple. You just need to go to the Setup Menu -> Automatic Setup -> Select your favorite Terminal -> Open new Terminal
- On this Terminal, simply start your backend server as usual. Proxyman will automatically capture all HTTPS traffic from your backend server.

3. Setup Breakpoint on the request
It's time to create a Breakpoint rule.
Let's say we have this request with URL: https://httpbin.org/post?id=proxyman&action=change_response
with body:
{ "name": "Proxyman", "id": 123, "details": { "address": "123 Main St, Anytown, USA", "phone": "123-456-7890", "email": "hi@proxyman.com" } }
We want to change the response status code to 201, and add a new header X-Proxyman-Test: true
and change the body to:
{ "name": "Get API", }
Before creating a Breakpoint rule, we need to make sure that Proxyman is capturing the traffic for the above request.
- Let's open the Terminal app and run this cURL command (Make sure Proxyman is running)
curl -X POST https://httpbin.org/post?id=proxyman&action=change_response -d '{"name": "Proxyman", "id": 123, "details": {"address": "123 Main St, Anytown, USA", "phone": "123-456-7890", "email": "hi@proxyman.com"}}' --proxy localhost:9090
- Back to Proxyman, you will see the request is captured by Proxyman.

If you don't see the HTTP Response, try to click on "Enable on this domain" button on the Response Panel -> Re-run your cURL again.
- Now, let's create a Breakpoint rule for the above request: Simple right click on this request -> Tools -> Breakpoint => Proxyman will automatically create a Breakpoint rule for the above request.
- Check the the checkbox "On Response" and leave the "on Request" checkbox unchecked

- It's time for testing. Open your Terminal app and re-run the same cURL command.
- At this point, new Breakpoint Editor will be opened. On the Response Panel, you can:

- Change the Response Status Code

- Change the Response Header

- Change the Response Body

- Click on the "Execute" button to apply the changes.
- Done.
Check your Terminal, you will see the response is changed.

3. What next?
- Breakpoint Tool is also allowed your to modify the HTTP Request too, including the URL, Method, Header, Body, etc.
- One disadvantage of Breakpoint Tool is that you have to manaully modify the HTTP Request, Header, Body, every time the breakpoint is hit -> Time-consuming ❌
- If you want to make it automatic, check out the Script Tool and all useful snippet Codes
Proxyman is a high-performance macOS/Windows/Linux app, which enables developers to capture HTTPs traffic on iOS device, iOS Simulator and Android devices.
Get it at https://proxyman.com
