mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 03:30:34 +00:00
Only set decompression when supported
This commit is contained in:
@@ -16,9 +16,12 @@ namespace Octokit.Internal
|
||||
|
||||
var httpOptions = new HttpClientHandler
|
||||
{
|
||||
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
|
||||
AllowAutoRedirect = request.AllowAutoRedirect
|
||||
};
|
||||
if (httpOptions.SupportsAutomaticDecompression)
|
||||
{
|
||||
httpOptions.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
||||
}
|
||||
|
||||
var http = new HttpClient(httpOptions)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user