HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.sufeinet.com",//URL 必需项
Method = "get",//URL 可选项 默认为Get
Cookie="s=123",
IsUpdateCookie=true//标志Cookie会被更新
};
HttpResult result = http.GetHtml(item);
string html = result.Html;
//新的Cookie
string cookie = item.Cookie;
//下次请求就不需要再录入Cookie了
item.URL = "http://www.baidu.com";
自动合并两个Cookie的值返回更新后结果
result = http.GetHtml(item);
string cookie1 = "s=1;s1=2;";
string cookie2 = "a=1;a1=2;";
string sumcookie = HttpHelper.GetMergeCookie(cookie1, cookie2);
欢迎光临 苏飞论坛 (http://www.sufeinet.com/) | Powered by Discuz! X3.4 |