How to change response body with Charles?

后端 未结 4 1613
时光说笑
时光说笑 2020-12-30 19:55

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

相关标签:
4条回答
  • 2020-12-30 20:25

    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.

    0 讨论(0)
  • 2020-12-30 20:27

    Share how to Enable breakpoints, then change response.

    1. request the link firstly. then enable breakpoint > in the http request right click > choose Breakpoints

      2. Menu Proxy > Breakpoints Settings > double click the request link
      3. change the Scheme GET/POST > Query *
      4. modify the request, change the tab Edit Request > you can change the URL, Headers, Cookies, etc > then click the Execute
      5. edit the response: choose tab Edit Response > change the response > click the Execute
      Enjoy it. You make it.
    0 讨论(0)
  • 2020-12-30 20:44

    Enable breakpoints, then change response. You should press continue/send request to send it before tweak response.

    0 讨论(0)
  • 2020-12-30 20:45

    As was mentioned Charles Proxy(4.2.8 version) allows you to change response body using different approaches:

    1. Map Local Tool ⌘ command + ⌥ option + L - Use local files to serve remote location
    2. Map Remote Tool ⌘ command + ⌥ option + M - Modify the request location to map one remote location to another
    3. Rewrite Tool ⌘ command + ⌥option + R - Modify requests and responses as they pass through Charles
    4. Breakpoints Tool ⌘ command + ⇧ shift + K - Intercept and edit requests and responses before they are sent and received

    Read more here

    0 讨论(0)
提交回复
热议问题