在写一个接口,http://tool.itseo.net/ 这是一个关键词批量查询的网站,想用工具写成接口
[C#] 纯文本查看 复制代码
HttpHelper Http = new HttpHelper();
HttpItem item2 = null;
HttpResult result2 = null;
item2 = new HttpItem()
{
URL = "http://tool.itseo.net/rank.do",
Method = "post",
Accept = "application/json, text/javascript, */*; q=0.01",
ContentType = "application/x-www-form-urlencoded; charset=UTF-8",
Postdata = "site=www.baidu.com&cmpts=&rn=&searcher=web&wd=百度",
ReadWriteTimeout = 10000,
// Allowautoredirect = true,
Referer = "http://tool.itseo.net/rank.jsp",
Timeout = 10000
};
item2.Header.Add("X-Requested-With: XMLHttpRequest");
result2 = Http.GetHtml(item2);
MessageBox.Show(result2.Html);
上面是用飞的类写的一个POST请求,但是返回的json数据没有查询到的结果...
res是 null...
为什么获取不到??求大神解惑~ 感激不尽!
|