From bb4c918bf8403b2058f5fbbf2c0b1943b4b5f327 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 2 Oct 2013 13:05:13 -0400 Subject: refactor http client factory for mono --- .../Native/HttpClientFactory.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 MediaBrowser.Server.Mono/Native/HttpClientFactory.cs (limited to 'MediaBrowser.Server.Mono/Native/HttpClientFactory.cs') diff --git a/MediaBrowser.Server.Mono/Native/HttpClientFactory.cs b/MediaBrowser.Server.Mono/Native/HttpClientFactory.cs new file mode 100644 index 000000000..0fceab060 --- /dev/null +++ b/MediaBrowser.Server.Mono/Native/HttpClientFactory.cs @@ -0,0 +1,24 @@ +using System; +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) + { + return new HttpClient() + { + Timeout = TimeSpan.FromSeconds(20) + }; + } + } +} -- cgit v1.2.3