Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions CSharpHTTPClient/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public virtual Dictionary<string, string> DeserializeResponseHeaders(HttpRespons

public class Client : DynamicObject
{
private static HttpClient _httpClient = new HttpClient();
public string Host;
public Dictionary <string,string> RequestHeaders;
public string Version;
Expand Down Expand Up @@ -183,29 +182,6 @@ private Client BuildClient(string name = null)

}

/// Factory method to return the right HttpClient settings.
/// </summary>
/// <returns>Instance of HttpClient</returns>
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;
}

/// <summary>

/// <summary>
/// Add the authorization header, override to customize
/// </summary>
Expand Down