diff --git a/OpenMeteo/OpenMeteo.cs b/OpenMeteo/OpenMeteo.cs index ed6ed26..71a22d9 100644 --- a/OpenMeteo/OpenMeteo.cs +++ b/OpenMeteo/OpenMeteo.cs @@ -19,7 +19,10 @@ public OpenMeteoClient(HttpClient client) public OpenMeteoClient() { - this.Client = new HttpClient(new RetryHandler(new HttpClientHandler())); + HttpClientHandler handler = new HttpClientHandler(); + handler.AutomaticDecompression = System.Net.DecompressionMethods.Deflate | System.Net.DecompressionMethods.GZip; + this.Client = new HttpClient(new RetryHandler(handler)); + this.Client.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Encoding", "gzip, deflate"); } /// diff --git a/README.md b/README.md index 9dc0387..fb8a20f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # dotnet -.NET bindings to decode Open-Meteo Weather API responses based on FlatBuffers +.NET bindings to decode Open-Meteo Weather API responses based on FlatBuffers. + +This library provides only basic functionality to decode binary FlatBuffers messages to efficiently transfer large amounts of weather data. It does not provide high level abstraction. + +