|
请求 https://www.paypal.com/signin/in ... rememberMeContent=1
用浏览器抓包,发现时GET方法。
用下面代码提交,
loitem = new HttpItem()
{
URL = sUrl,
Method = "GET",
Timeout = 100000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36",//用户的浏览器类型,版本,操作系统 可选项有默认值
Host = "www.paypal.com",
Referer = redirect_url,
Cookie = cookies,
ProxyIp = sProxyIP,
ProxyUserName = sProxyUser,
ProxyPwd = sProxyPwd,
};
//得到HTML代码
loresult = lohttp.GetHtml(loitem);
if (loresult.StatusCode != System.Net.HttpStatusCode.OK)
{
System.Diagnostics.Debug.Write("=====返回。提交出现异常\r\n" + lohtml);
ErrorMsg = lohtml;
return -2;
}
loresult.StatusCode 是Unauthorized。而浏览器返回的是OK。请问飞哥和各位兄弟姐妹,有谁知道是怎么回事么?
|
|