How ignore SSL verification #947
-
Hello community, For test purposes, I have a local ODATA service with a self-signed certificate. Because of it, the SSL connection can't be established. I tried to explore the ODataClientSettings class, but nothing found regarding how to handle the certificate. How could I ignore the certificate validation? Something similar to standard HttpClient: HttpClientHandler handler = new HttpClientHandler Hello team, any suggestion you could provide me, I really appreciate it. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
HttpClientHandler handler = new HttpClientHandler var oDataClientSettings = new ODataClientSettings(new Uri(base_url + "/odata/")) |
Beta Was this translation helpful? Give feedback.
HttpClientHandler handler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
}
var oDataClientSettings = new ODataClientSettings(new Uri(base_url + "/odata/"))
{
OnCreateMessageHandler = () => handler
};
var client = new ODataClient(oDataClientSettings);