好的,所以我假设你已经能够监控你的客户端/服务器流量了。您要做的是在响应上设置一个断点,然后在将其发送到客户端之前摆弄它。
Ok, so I assume that you're already able to monitor your client/server traffic. What you want to do is set a breakpoint on the response then fiddle with it before sending it on to the client.
以下是几种不同的方法:
Here are a couple of different ways to do that:
- 规则>自动断点>回复后
- 在quickexec框中(黑色框中的黑框)底部)输入bpafter yourpage.svc。现在Fiddler将在对包含yourpage.svc的任何URL的所有请求之前停在断点处。键入bpafter,没有参数来清除断点。
- 使用FiddlerScript以编程方式篡改响应。 FiddlerScript的***文档在官方网站上: http://www.fiddler2.com/Fiddler/dev /
- Rules > Automatic Breakpoints > After Responses
- In the quickexec box (the black box at the bottom) type "bpafter yourpage.svc". Now Fiddler will stop at a breakpoint before all requests to any URL that contains "yourpage.svc". Type "bpafter" with no parameters to clear the breakpoint.
- Programmatically tamper with the response using FiddlerScript. The best documentation for FiddlerScript is on the official site: http://www.fiddler2.com/Fiddler/dev/
一旦你在断点处停止了响应,只需双击它就可以在检查员中打开它。你现在有几个选择:
Once you've got a response stopped at the breakpoint, just double click it to open it in the inspectors. You've got a couple of options now:
- 在绿色的Run to Completion按钮旁边(你点击发送回复)有一个下拉列表可以让你选择一些默认的响应类型。
- 或者,在Headers检查器上,更改响应代码&顶部文本框中的消息。
- 或者,单击原始检查器并弄乱原始响应以对其执行任意操作。同样是一个很好的方法来查看客户端在收到格式错误的响应时会做什么,您可能会意外地进行测试:)