diff --git a/src/ConfigCatClient/HttpConfigFetcher.cs b/src/ConfigCatClient/HttpConfigFetcher.cs index a015411c..92f6a0fb 100644 --- a/src/ConfigCatClient/HttpConfigFetcher.cs +++ b/src/ConfigCatClient/HttpConfigFetcher.cs @@ -249,10 +249,12 @@ private HttpClient CreateHttpClient() if (this.httpClientHandler is null) { - client = new HttpClient(new HttpClientHandler + var handler = new HttpClientHandler(); + if (handler.SupportsAutomaticDecompression) { - AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate - }); + handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; + } + client = new HttpClient(handler); } else {