From d46ab425a09322e12684617e217dda7b694549bf Mon Sep 17 00:00:00 2001 From: Elmer Thomas Date: Wed, 19 Feb 2020 07:06:47 -0800 Subject: [PATCH 1/2] remove unused function --- CSharpHTTPClient/Client.cs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/CSharpHTTPClient/Client.cs b/CSharpHTTPClient/Client.cs index 94d954c..20a0c4f 100644 --- a/CSharpHTTPClient/Client.cs +++ b/CSharpHTTPClient/Client.cs @@ -183,29 +183,6 @@ private Client BuildClient(string name = null) } - /// Factory method to return the right HttpClient settings. - /// - /// Instance of HttpClient - private HttpClient BuildHttpClient() - { - // Add the WebProxy if set - if (WebProxy != null) - { - var httpClientHandler = new HttpClientHandler() - { - Proxy = WebProxy, - PreAuthenticate = true, - UseDefaultCredentials = false, - }; - - return new HttpClient(httpClientHandler); - } - - return _httpClient; - } - - /// - /// /// Add the authorization header, override to customize /// From 6568ff1dc1c54c68eaa4aaf1329f60bb9c6c638e Mon Sep 17 00:00:00 2001 From: Elmer Thomas Date: Wed, 19 Feb 2020 07:08:52 -0800 Subject: [PATCH 2/2] remove unused variable --- CSharpHTTPClient/Client.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/CSharpHTTPClient/Client.cs b/CSharpHTTPClient/Client.cs index 20a0c4f..c72a619 100644 --- a/CSharpHTTPClient/Client.cs +++ b/CSharpHTTPClient/Client.cs @@ -64,7 +64,6 @@ public virtual Dictionary DeserializeResponseHeaders(HttpRespons public class Client : DynamicObject { - private static HttpClient _httpClient = new HttpClient(); public string Host; public Dictionary RequestHeaders; public string Version;