|
string url = "";
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = url,
Accept = "application/json, text/plain, */*",
ContentType = "application/json;charset=UTF-8",
UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15",
Method = "post",//URL 可选项 默认为Get
Postdata = "{}",
//CerPath="/"
};
item.Header.Add("Accept-Encoding", "br, gzip, deflate");
item.Header.Add("Accept-Language", "zh-cn");
HttpResult result = http.GetHtml(item);
result 返回错误值:基础连接已经关闭: 未能为 SSL/TLS 安全通道建立信任关系
已搜索论坛帖子,说是证书问题,按照http://www.sufeinet.com/thread-6-1-1.html和http://www.sufeinet.com/thread-13788-1-1.html的流程,均无法解决,但是用浏览器直接可以打开URL,用迅雷都可以直接下载返回json文件,但是用httphelper.gethtml()报错,求助大神!!!!
|
|