Switch from HttpClientHandler to SocketsHttpHandler

SocketsHttpHandler is the default for .Net Core 2.1 and newer

Set RequestHeaderEncoding to UTF-8 by default
This commit is contained in:
Bond_009
2021-04-19 22:37:24 +02:00
parent 4c915f5edf
commit 500c2e5224
2 changed files with 12 additions and 21 deletions

View File

@@ -1,19 +0,0 @@
using System.Net;
using System.Net.Http;
namespace MediaBrowser.Common.Net
{
/// <summary>
/// Default http client handler.
/// </summary>
public class DefaultHttpClientHandler : HttpClientHandler
{
/// <summary>
/// Initializes a new instance of the <see cref="DefaultHttpClientHandler"/> class.
/// </summary>
public DefaultHttpClientHandler()
{
AutomaticDecompression = DecompressionMethods.All;
}
}
}