|
网站地址 http://www.kuaipan.cn/account_login.htm
测试账号 kuaipantest@126.com
测试密码 kptest
一直困扰在返回的信息是本次请求并未返回任何数据,请问该怎么解决这个问题?- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using DotNet.Utilities;
- namespace 金山快盘登陆
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- HttpHelper http = new HttpHelper();
- HttpItem item = new HttpItem()
- {
- URL = "https://www.kuaipan.cn/account_login.htm"
- };
- HttpResult result = http.GetHtml(item);
- textBox3.AppendText(result.Cookie + "\r\n");
- //第二次提交的item
- item.URL = "http://www.kuaipan.cn/index.php?ac=account&op=login";
- item.Method = "POST";
- item.PostDataType = PostDataType.String;
- item.Postdata = "username=kuaipantest%40126.com&userpwd=kptest&isajax=yes";
- result = http.GetHtml(item);
- textBox3.AppendText(result.Html);
- }
- }
- }
复制代码 请求头信息如下
POST /index.php?ac=account&op=login HTTP/1.1
Host: www.kuaipan.cn
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
Accept: application/json, text/javascript, */*
Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://www.kuaipan.cn/account_login.htm
Content-Length: 56
Cookie: _ga=GA1.2.385947682.1382665708; logindate=2013-10-25; ksc_suv=1426187460.1382665729126; PHPSESSID=bb6lpftcgl1lfsaerki9s3ug17; _fs=e5cdad66; token=00119b39d5814c8b97e23f3621500dd9-1622513971; _et=03383626fb85161c0d783ffe9fb1386b9109fa8068c024c26bc6f2af691c1a91d2877be4984127116fff54; relogintoken=00119b39624e40f3ae553d83cb3dbe2c-c858343a13d847e68efa7b602e0e653a-1153849
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
|
|