aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-08-19 06:31:45 -0600
committercrobibero <cody@robibe.ro>2020-08-19 06:31:45 -0600
commit076e17f35556c6d1257856896619e30eb494b2bb (patch)
tree6078303f35f0cd2ac33a33fcf4558be88f86c248 /MediaBrowser.Common/Net/DefaultHttpClientHandler.cs
parent93fe595e5e9863874c1973e4f2d7f3c85549d3f9 (diff)
Add default http client
Diffstat (limited to 'MediaBrowser.Common/Net/DefaultHttpClientHandler.cs')
-rw-r--r--MediaBrowser.Common/Net/DefaultHttpClientHandler.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs b/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs
new file mode 100644
index 000000000..6608fad34
--- /dev/null
+++ b/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs
@@ -0,0 +1,18 @@
+using System.Net;
+using System.Net.Http;
+
+namespace MediaBrowser.Common.Net
+{
+ /// <summary>
+ /// Default http client handler.
+ /// </summary>
+ public class DefaultHttpClientHandler : HttpClientHandler
+ {
+ /// <inheritdoc />
+ public DefaultHttpClientHandler()
+ {
+ // TODO change to DecompressionMethods.All with .NET5
+ AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
+ }
+ }
+}