Charles is a fiddler-like agent in Mac OS that feels more powerful than fiddler, with the ability to specify request responses, tamper with request content, delay requests, and capture phone-side requests via Charles Because of the recent need to do mobile, because the phone side of the request can not be captured on the Mac system, this requires Charles to capture the phone-side request for development debugging. Here's a quick look at how to set up Charles as a proxy for your mobile phone.
Here are a few steps:
1. Need Mac and the phone to be debugged in the same WiFi environment
2. Check your Mac's current IP address, via the Charles toolbar: help-->local IP Adress ... The popup is the IP address of the current Mac
3. View the port number of the current Charles Agent Mac; on the Charles toolbar: Proxy-->proxy settings...-->proxies tab, you can view the current Charles Proxy port
3, open the phone to be debugged, select the same wireless WiFi, access to the information page of the WiFi environment
4. Select the agent in the Settings page, enter the hostname IP address of the Mac, and then save the port
5. When Charles pops up to allow a prompt to proxy the phone, click "Enable" to capture the request data on Charles.
Charles captures phone-side request data