Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xtrmstep/a5db94509853d3b35ab36d66cc376383 to your computer and use it in GitHub Desktop.
Save xtrmstep/a5db94509853d3b35ab36d66cc376383 to your computer and use it in GitHub Desktop.
httpClientBuilder.ConfigureChannel(o =>
{
// add SSL credentials
o.Credentials = new SslCredentials();
// allow invalid/untrusted certificates
var httpClientHandler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
var httpClient = new HttpClient(httpClientHandler);
o.HttpClient = httpClient;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment