Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change response body with Charles?

I am using Charles (http://www.charlesproxy.com) to debug my HTTP requests and now I run into an issue where I am receiving json response which I need to edit to see how my app behaves.

I was looking at Rewrite option but can't really figure out how to change it. Ideal would be to load whole response from disk.

Any ideas how to accomplish this? Thank you.

like image 912
user3339562 Avatar asked Jul 28 '15 15:07

user3339562


People also ask

How do I see Charles response?

Basically you need to download a certificate to your device(simulator). Open safari and go to chls.pro/ssl and install it. Then on the device go to settings->general->about->Certificate Thrust settings and enable the certificate. Then enable SSL proxy in Charles by going to Proxy tab->SSL proxy and voila.

How do I intercept a Charles request?

How it works. When a request or response trips a breakpoint the Breakpoints window automatically opens in Charles and comes to the front. The Breakpoints window contains a list of the requests and responses currently intercepted and waiting for your action. Select the request or response to view and edit the contents.


1 Answers

The Map Local tool is probably what you're looking for. Access via menu Tools | Map Local.... Note, you may need a corresponding rewrite rule (Tools | Rewrite...) to ensure the mime type of your response served from disk and the type your application is expecting. But recent versions of Charles may set the type automatically.

like image 158
Michael Luton Avatar answered Oct 07 '22 01:10

Michael Luton