Initial commit.
This commit is contained in:
15
Shared/Tools.cs
Normal file
15
Shared/Tools.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace ClientApiPoC.Shared {
|
||||
public static class Tools {
|
||||
public static HttpClient CreateHttpClient() {
|
||||
var httpClientHandler = new HttpClientHandler() {
|
||||
ServerCertificateCustomValidationCallback = (message, cert, chain, sslPolicyErrors) => {
|
||||
// HACK: Allen SSL-Zertifikaten vertrauen!
|
||||
return true;
|
||||
}
|
||||
};
|
||||
return new HttpClient(httpClientHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user