|
本帖最后由 bombboy 于 2014-8-29 13:02 编辑
请教个问题,我第一个POST请求登录成功,带着第一次的COOKIE GET第二个页面的时候,自动跳转到了登录界面,能帮我看下吗
public string Loninff()
{
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://u.feifei.com/front/login/dologinbyemail",
Method = "POST",
ContentType = "application/x-www-form-urlencoded",
Postdata = "username=xxx%40qq.com&password=qqqqq1&email=xxx%40qq.com&telephone=",
Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36",
Host = "u.feifei.com",
Referer = "http://u.feifei.com/front/login/index",
};
HttpResult result = http.GetHtml(item);
item = new HttpItem()
{
URL = "http://u.feifei.com/account/customer/infoedit",
Method = "GET",
ContentType = "application/x-www-form-urlencoded",
Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36",
Host = "u.feifei.com",
Referer="http://u.feifei.com/front/login/index",
Cookie = result.Cookie,
};
result = http.GetHtml(item);
return result.Html;
}
|
|