PortableRest
PortableRest copied to clipboard
Ignore SSL issues
When using Windows.Web.Http.HttpClient
you can do stuff like this:
private HttpClient CreateClient()
{
var filter = new HttpBaseProtocolFilter();
if (_env.IgnoreSslProblems)
{
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.IncompleteChain);
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.Expired);
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.Untrusted);
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.InvalidName);
}
return new HttpClient(filter);
}
Is it possible to do this with PortableRest? Or would we have to create a (less portable) fork?
I will look into it. It seems really useful for testing purposes, so if we have to create platform-specific libraries to be able to make it happen, then that might be the way to go.