使用fiddle 4抓的包:
POST /pdalogin/p/common/loginandpremission HTTP/1.1
Connection: Keep-Alive
Accept-Encoding: gzip
content-type: application/json
Content-Length: 54
User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.3; vivo Xplay3S Build/JLS36C)
Host: 211.156.195.15
c#脚本:
HttpItem item1 = new HttpItem()
{
URL = URL_temp,//URL 必需项
Method = Method_temp,//URL 可选项 默认为Get
IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写
Postdata = Postdata_temp,//Post数据 可选项GET时不需要写
Timeout = 200000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
UserAgent = "Dalvik/1.6.0 (Linux; U; Android 4.3; vivo Xplay3S Build/JLS36C)",//用户的浏览器类型,版本,操作系统 可选项有默认值
ContentType = "application/json",//返回类