michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
412 stars 114 forks source link

HttpClient fix for all locators #204

Closed Indigo744 closed 4 years ago

Indigo744 commented 4 years ago

Continuing #198 and the issue found by @d8ahazard

This PR brings the following fixes:

The rational to use a shared HttpClient is from:

This is actually the way the HueClient class is built, with either a shared HttpClient, or a given one by the user in the constructor.

I choose not to change the IBridgeLocator signature for now and use a local common HttpClient. But if you want me to add a new constructor signature to match the HueClient class, feel free to ask.