From 3453b178e28a7ae43c997205b789233ec56d38d2 Mon Sep 17 00:00:00 2001 From: Harry Yu Date: Mon, 1 Feb 2021 16:25:57 +0800 Subject: [PATCH] Remove socketsHttpHandler --- Flow.Launcher.Infrastructure/Http/Http.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Http/Http.cs b/Flow.Launcher.Infrastructure/Http/Http.cs index 988976749..de2e82359 100644 --- a/Flow.Launcher.Infrastructure/Http/Http.cs +++ b/Flow.Launcher.Infrastructure/Http/Http.cs @@ -16,13 +16,7 @@ namespace Flow.Launcher.Infrastructure.Http { private const string UserAgent = @"Mozilla/5.0 (Trident/7.0; rv:11.0) like Gecko"; - private static HttpClient client; - - private static SocketsHttpHandler socketsHttpHandler = new SocketsHttpHandler() - { - UseProxy = true, - Proxy = WebProxy - }; + private static HttpClient client = new HttpClient(); static Http() { @@ -32,7 +26,6 @@ namespace Flow.Launcher.Infrastructure.Http | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; - client = new HttpClient(socketsHttpHandler, false); client.DefaultRequestHeaders.Add("User-Agent", UserAgent); HttpClient.DefaultProxy = WebProxy; }