[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.String //默认值可以不写
};
//请求的返回值对象
HttpResult result = http.GetHtml(item);
//获取请求的Cookie
string cookie = result.Cookie;
//字符串Cookie转为CookieCollection类型Cookie
CookieCollection cookielist = HttpHelper.StrCookieToCookieCollection(cookie);