|
用fiddler截取的cookie
POST https://visaservicesonline.vfsgl ... egistrationPwd.aspx HTTP/1.1
Host: visaservicesonline.vfsglobal.com
Connection: keep-alive
Content-Length: 2275
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: https://visaservicesonline.vfsglobal.com
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: https://visaservicesonline.vfsgl ... ilRegistration.aspx
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: ASP.NET_SessionId=435b09fc-a6ae-4a97-a698-64f6e58ec6fe
我自己写的cookie中包含了:
request.AllowAutoRedirect = true;
request.KeepAlive = true;
request.Method = "POST";
request.ProtocolVersion = new Version("1.0");
request.Proxy = WebRequest.DefaultWebProxy;
request.Credentials = CredentialCache.DefaultCredentials;
request.Headers.Add("Cache-Control: max-age=0");
request.Headers.Add("Upgrade-Insecure-Requests", "1");
request.Headers.Add("Accept-Encoding", "gzip,deflate,sdch,GB2312");
request.Headers.Add("Accept-Language", "zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-TW;q=0.2,fr;q=0.2,ja;q=0.2");
request.ContentType = "application/x-www-form-urlencoded";
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
其中怕post也是一样的但是就是不能到下一个界面,我对比发现我的例程里面少了Referer: https://visaservicesonline.vfsgl ... ilRegistration.aspx这个有很大影响吗
request.UserAgent = " Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36";
|
|