|
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "https://passport.58.com/login/dologin",//URL 必需项
Method = "post",//URL 可选项 默认为Get
IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写
Cookie = "",//字符串Cookie 可选项
//Referer = "",//来源URL 可选项
Postdata = "isweak=0&source=&path=&password=12b2c6634c2f00b65139ded83d7aea9c83a021b281307c2f2c6f600aa79a95a0b4115d1533262aff2e2136548e88d31fa21b9c1b0ef57a53876b3ce476d6ca616ed49ebd596dfa7baa07b9ba9275d205b9cf87449eb3c57c86baf78351a4232b3fd05f3cd7eed6c0ea870ba31c021797b6301c0b28a7b148e8b1b9b78b9f8dcd×ign=1496299470487&isremember=false&callback=successFun&yzmstate=&username=18036516327&=&btnSubmit=%E7%99%BB%E5%BD%95%E4%B8%AD...",
Timeout = 100000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",//用户的浏览器类型,版本,操作系统 可选项有默认值
ContentType = "text/html",//返回类型 可选项有默认值
Allowautoredirect = false,//是否根据301跳转 可选项
//ResultType = ResultType.String
};
HttpResult result = http.GetHtml(item);
string html = result.Html;
string cookie = result.Cookie;
Debug.WriteLine(html);
Debug.WriteLine(cookie);
请问一下为什么POST一直返回空呢??HttpWebRequest 也是一样
|
|