diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-08-31 19:07:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-31 19:07:10 +0200 |
| commit | 5c50d5356c2779dfa980df1acd62d3e6ca41f198 (patch) | |
| tree | 91cc4d6c271e99256a39f3cacbe1a49bb40ef71a /MediaBrowser.Common/Net/DefaultHttpClientHandler.cs | |
| parent | 95142643f6c98fe4380c63ba9b3055fd3a637466 (diff) | |
| parent | 95402df88408b96300e627b9962d0e4db2e4c7c5 (diff) | |
Merge pull request #3935 from crobibero/default-http-client
Add Default Http Client
Diffstat (limited to 'MediaBrowser.Common/Net/DefaultHttpClientHandler.cs')
| -rw-r--r-- | MediaBrowser.Common/Net/DefaultHttpClientHandler.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs b/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs new file mode 100644 index 000000000..e189d6e70 --- /dev/null +++ b/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs @@ -0,0 +1,20 @@ +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() + { + // TODO change to DecompressionMethods.All with .NET5 + AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; + } + } +} |
