[C#] 纯文本查看 复制代码
HttpHelper http = new HttpHelper();[/size]
HttpItem item = new HttpItem()
{
URL = "http://www.torrentz.eu",//URL这里都是测试必需项
Method = "get",//URL 可选项 默认为Get
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0",
Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
ContentType = "text/html",
//Connection = "keep-alive",
};
item.Header.Add("Accept-Language", "en-US,en;q=0.5");
item.Header.Add("Accept-Encoding", "gzip, deflate");
// item.Header.Add("Connection", "keep-alive");
//得到HTML代码
HttpResult result = http.GetHtml(item);
string html = result.Html;