wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
335 stars 131 forks source link

Support for HttpClient without BaseAddress set #353

Closed PetesBreenCoding closed 3 months ago

PetesBreenCoding commented 8 months ago

According to Microsoft recommendations, HttpClient instances should be reused as much as possible. With that said, this PR is to support applications using a HttpClient instance that does not have a BaseAddress set, as it may be connecting to multiple different APIs.

I have implemented this as an optional parameter so that it's not a breaking change and users can continue to use it through the BaseAddress property of the HttpClient.

See issue 312

ThomasPe commented 3 months ago

thx and sorry for the long wait!