PhilPJL / ImpSoft.OctopusEnergy

A .Net and .Net Core client for Octopus Energy's tariff and energy consumption API.
MIT License
10 stars 4 forks source link

AutomaticCompression property not supported in Blazor Wasm #8

Closed PhilPJL closed 4 years ago

PhilPJL commented 4 years ago

HttpClientHandler.AutomaticCompression throws a not supported exception when used in Blazor Wasm.

Options are 1) don't use it 2) catch exceptions 3) add flag to optionally set the property

PhilPJL commented 4 years ago

Decided to add bool? flag a) true = set compression appropriate to platform b) false = set compression to None c) null = don't use the property