fiddler 模拟发送post请求

打开fiddler,选择在右边的Composer工具栏,打开Parsed选项,然后数据发送协议,例如选择POST,

POST右边输入框可以输入访问地址,

下方的输入框可以输入发送的输入操作,例如发送的是utf-8格式,可以加上:Content-Type: charset=utf-8

发送格式是json的话,可以加上:Content-Type: application/json,如果是www格式,

可以加上:Content-Type:application/x-www-form-urlencoded

再下方的输入框可以输入发送的body:例如发送的是json数据:可以输入:{"a":1,  "b":"HemJohn"},

如果是www数据,可以数据:name1=valule1&name2=value2

例如

发送一个post的www请求:

User-Agent: Fiddler

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

发送一个post的json请求:

User-Agent: Fiddler
Content-Length: 138
Content-Type:application/json; charset=utf-8

点击右上角的Execute按钮执行发送操作

返回结果可以在窗口左边的会出现:

双击发送结果,在窗口的右边会显示两个窗口,上面那个是发送包的内容,下面那个是接收包的内容,具体怎么分析,笔者很懒,这个就不多说。。。

转载请注明出处,http://i.cnblogs.com/EditPosts.aspx?postid=5703350

原文地址:https://www.cnblogs.com/HemJohn/p/5703350.html