|
- httphelper objhttp = new httphelper();
- objhttp.isToLower = false;
- HttpItem objHttpItem = new HttpItem();
- objHttpItem.URL = @"http://myw.1tpan.com/#/tpan";//此地址取不到COOKIE
- //你的网站可以取到COOKIE"http://www.sufeinet.com";
- objHttpItem.Method = "GET";
- objHttpItem.ContentType = "text/xml";
- objHttpItem.Encoding = "utf-8";
- objHttpItem.Cookie = objhttp.cookie;
- String aaa = objhttp.GetHtml(objHttpItem);
- String bbb = objhttp.cookie; //取不到值
复制代码 F11看了下,http://myw.1tpan.com/#/tpan此网站在类中的
- private string GetHttpRequestData(string strPostdata)
- .....
- using (response = (HttpWebResponse)request.GetResponse())
- {
- try
- {
- cookie = response.Headers["set-cookie"].ToString();
- }
- catch (Exception)
- {
- cookie = "--此处出错了---";
- }
复制代码 |
|