aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Net/DefaultHttpClientHandler.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-09-01 18:27:55 -0600
committercrobibero <cody@robibe.ro>2020-09-01 18:27:55 -0600
commit65d05f92ac7f7e5398fa49d5a5fdf0d984ce6989 (patch)
treed2e301cc99576b0901eb33d3723e15c665e32e4b /MediaBrowser.Common/Net/DefaultHttpClientHandler.cs
parente97ccd87fb74c34222eccf03493a56144065eaa4 (diff)
parent506fc7cbaeb8f82716f84b125ac598ff740bf552 (diff)
Merge remote-tracking branch 'upstream/master' into dynamic-cors
Diffstat (limited to 'MediaBrowser.Common/Net/DefaultHttpClientHandler.cs')
-rw-r--r--MediaBrowser.Common/Net/DefaultHttpClientHandler.cs20
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;
+ }
+ }
+}