|
[code=csharp] myitem = new HttpItem();
myitem.URL = "http://www.baudu.com";//URL 必需项
myitem.Accept = "text/html, application/xhtml+xml, */*";
myitem.Referer = "";
myitem.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";
myitem.ContentType = "application/x-www-form-urlencoded";
myitem.Header["Accept-Encoding"] = "gzip, deflate";
myitem.KeepAlive = true;
myitem.Header["Cache-Control"] = "no-cache";
myitem.Postdata = "code=1003&type=dd";
myitem.Method = "post";
//得到HTML代码
myresult = new HttpResult();
myresult = myhttp.GetHtml(myitem);
[/code]
postdata结果是:
code 1003
type dd
======================================
[code=csharp] myitem = new HttpItem();
myitem.URL = "http://www.baudu.com";//URL 必需项
myitem.Accept = "text/html, application/xhtml+xml, */*";
myitem.Referer = "";
myitem.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";
myitem.ContentType = "application/x-www-form-urlencoded";
myitem.Header["Accept-Encoding"] = "gzip, deflate";
myitem.KeepAlive = true;
myitem.Header["Cache-Control"] = "no-cache";
myitem.Postdata = "code=1003&url=asp?a=b&type=dd";
myitem.Method = "post";
//得到HTML代码
myresult = new HttpResult();
myresult = myhttp.GetHtml(myitem);
[/code]
postdata结果是:
a b
type dd
====================================
为什么结果不是想要的样子:
code 1003
url asp?a=b
type dd
这里是?号的原因吗,怎么处理?求助大虾。。。。
|
|