From 0bdc8a49d5ea17417b3552d6db21239190bc4b6b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 30 Nov 2013 01:07:25 -0500 Subject: switch from httpclient to plain httpwebrequest --- .../Native/HttpClientFactory.cs | 35 ---------------------- 1 file changed, 35 deletions(-) delete mode 100644 MediaBrowser.ServerApplication/Native/HttpClientFactory.cs (limited to 'MediaBrowser.ServerApplication/Native/HttpClientFactory.cs') diff --git a/MediaBrowser.ServerApplication/Native/HttpClientFactory.cs b/MediaBrowser.ServerApplication/Native/HttpClientFactory.cs deleted file mode 100644 index 368c60254..000000000 --- a/MediaBrowser.ServerApplication/Native/HttpClientFactory.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net; -using System.Net.Cache; -using System.Net.Http; - -namespace MediaBrowser.ServerApplication.Native -{ - /// - /// Class HttpClientFactory - /// - public static class HttpClientFactory - { - /// - /// Gets the HTTP client. - /// - /// if set to true [enable HTTP compression]. - /// HttpClient. - public static HttpClient GetHttpClient(bool enableHttpCompression) - { - var client = new HttpClient(new WebRequestHandler - { - CachePolicy = new RequestCachePolicy(RequestCacheLevel.Revalidate), - AutomaticDecompression = enableHttpCompression ? DecompressionMethods.Deflate : DecompressionMethods.None - - }) - { - Timeout = TimeSpan.FromSeconds(20) - }; - - client.DefaultRequestHeaders.Add("Connection", "Keep-Alive"); - - return client; - } - } -} -- cgit v1.2.3