[C#] 纯文本查看 复制代码
//创建Httphelper对象
HttpHelper http = new HttpHelper();
//创建Httphelper参数对象
HttpItem item = new HttpItem()
{
URL = "http://www.sufeinet.com",//URL 必需项
Method = "get",//URL 可选项 默认为Get
ContentType = "text/html",//返回类型 可选项有默认值
ResultCookieType = ResultCookieType.CookieCollection //默认值可以不写
};
//请求的返回值对象
HttpResult result = http.GetHtml(item);
//获取请求的Cookie
CookieCollection cookie = result.CookieCollection;
//CookieCollection类型Cookiel转为字符串Cookie
string strcookie = HttpHelper.CookieCollectionToStrCookie(cookie);