用Fiddler检查POST请求

Ngh*_*yen 31 http-post fiddler

如何使用Fiddler检查来自Web服务器的响应.我可以通过将URL粘贴到Request Builder中的字段来轻松检查GET方法,并在xml/json中返回响应.有一个选项POST,但我不知道如何将参数传递给POST.

例如:

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.google.com/accounts/ClientLogin");
request.Method = "POST";

string postData = "accountType=HOSTED_OR_GOOGLE";
postData += "&Email=yourusername@gmail.com";
postData += "&Passwd=yourpassword";
postData += "&service=finance";
postData += "&source=test-test-.01";
Run Code Online (Sandbox Code Playgroud)

如何在Fiddler中将我的数据传递给此POST方法以获取响应?

Eri*_*Law 61

最简单的做到这一点的方法是有小提琴手捕获这个请求并拖动实例/丢弃会话到请求生成器.

但是自己创建一个帖子并不难.将RequestBuilder的方法设置为POST,添加标题:

Content-Type: application/x-www-form-urlencoded

并在请求正文中填写帖子的文字:

accountType=HOSTED_OR_GOOGLE&Email=yourusername@gmail.com&Passwd=yourpassword&service=finance&source=test-test-.01