|
楼主 |
发表于 2016-1-19 14:08:06
|
显示全部楼层
基础连接已经关闭: 发送时发生错误。 我加了证书还是一样的
//ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem();
item.URL = "https://www.arrow.com/";
item.CerPath = @"D:\arrow.der";
item.Encoding = Encoding.GetEncoding("utf-8"); //得到HTML代码
HttpResult result = http.GetHtml(item);
//取出返回的Cookie
string cookie = result.Cookie;
//返回的Html内容
string html = result.Html;
if (result.StatusCode == System.Net.HttpStatusCode.OK)
{
//表示访问成功,具体的大家就参考HttpStatusCode类
}
//表示StatusCode的文字说明与描述
string statusCodeDescription = result.StatusDescription; |
|