Fixed https proxy for netstandard 1.3 and netstandard 2.0 (#85)

This commit is contained in:
Stef Heyenrath
2018-02-02 22:52:08 +01:00
parent 061eb93fd0
commit 361d40189b
19 changed files with 356 additions and 24 deletions

View File

@@ -43,7 +43,11 @@ namespace WireMock.Http
// If UseCookies enabled, httpClient ignores Cookie header
handler.UseCookies = false;
return new HttpClient(handler);
var client = new HttpClient(handler);
#if NET452 || NET46
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
#endif
return client;
}
public static async Task<ResponseMessage> SendAsync(HttpClient client, RequestMessage requestMessage, string url)