110,538
社区成员
发帖
与我相关
我的任务
分享
string url = "https://data.cathaylife.cn/servlet/HttpDispatcher/KAA0_0100/prompt?newTxRequest=true&syscode=DA&subcode=KAA0";
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
myRequest.Method = "GET";
myRequest.Proxy = null;
myRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0";
myRequest.Headers.Add("Accept-Language", "zh-cn,en-us;q=0.8,zh-hk;q=0.6,ja;q=0.4,zh;q=0.2");
myRequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
MessageBox.Show(new System.IO.StreamReader(myResponse.GetResponseStream(),Encoding.GetEncoding("GB2312")).ReadToEnd());