gpt4 book ai didi

https - RestSharp - 忽略 SSL 错误

转载 作者:行者123 更新时间:2023-12-03 05:42:35 25 4
gpt4 key购买 nike

有什么方法可以让 RestSharp 忽略 SSL 证书中的错误吗?我有一个测试客户端,但我连接的服务还没有有效的证书。

当我现在发出请求时,我收到错误:

The underlying connection was closed: Could not establish trust 
relationship for the SSL/TLS secure channel.

最佳答案

正如约翰建议的那样:

ServicePointManager.ServerCertificateValidationCallback +=
(sender, certificate, chain, sslPolicyErrors) => true;

关于https - RestSharp - 忽略 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10397736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com