fully removed System.Net.HttpWebRequest dependency

This commit is contained in:
Luke Pulverenti
2013-08-28 16:12:58 -04:00
parent ac802322de
commit 528100ab31
6 changed files with 26 additions and 13 deletions

View File

@@ -19,6 +19,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
@@ -272,7 +273,7 @@ namespace MediaBrowser.Common.Implementations
RegisterSingleInstance(TaskManager);
HttpClient = new HttpClientManager.HttpClientManager(ApplicationPaths, Logger);
HttpClient = new HttpClientManager.HttpClientManager(ApplicationPaths, Logger, GetHttpMessageHandler);
RegisterSingleInstance(HttpClient);
NetworkManager = new NetworkManager();
@@ -286,6 +287,8 @@ namespace MediaBrowser.Common.Implementations
});
}
protected abstract HttpMessageHandler GetHttpMessageHandler(bool enableHttpCompression);
/// <summary>
/// Gets a list of types within an assembly
/// This will handle situations that would normally throw an exception - such as a type within the assembly that depends on some other non-existant reference