I'm using Charles' Rewrite Tool to change 200 responses to 400 in order to test failing API calls. However, the rewrite is triggering on the Options
request. I'd like to only have it trigger on the Get
or Post
requests and allow the Options
requests through. Is this possible using Charles?
相关问题
- Unable to Install the Charles Proxy profile on App
- Charles Proxy not working for Android version abov
- How to add network security configuration to enabl
- How to change response body with Charles?
- How to analyze https traffic from Android 6 emulat
相关文章
- How to change response body with Charles?
- How to analyze https traffic from Android 6 emulat
- Charles Proxy SSL: “SSL Proxying not enabled for t
- Handshake alert: unrecognized_name error
- How to setup Android Lollipop emulator with Charle
- How do I add -http-proxy to an android emulator la
- 如何使HttpClient的中继业务在Fidder酒店或查尔斯露面?(How to make Htt
- Android 9 (Pie) - Not able to capture any api (nat
We have this exact same need to mock API responses. Since the Rewrite tool doesn't support this feature, we have setup Breakpoints on the responses we want to mock, once the breakpoint is hit, we change the response to whatever we want. It works, but is less than ideal.
We were able to work around the issue by assuming that OPTIONS would always return an empty body.
The below Regex values will match for GET (because it has a body) and not match for OPTIONS (because it doesn't have a body).
or
I think Charles does not have this option, which is really a pitty, because it seems to be easy to implement and it would open the doors to the API world.
I would suggest you to ask Karl (the author and main developer) for this new feature at the contact section of the site.