Open
Description
It's about the following code:
And see the following article for an explanation on this:
https://www.aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
But using a singleton (via a static) can also have issues, like:
https://byterot.blogspot.com/2016/07/singleton-httpclient-dns.html
Since with this SDK, you can't really rely on Dependency Injection, I would prefer that all HttpClients, this SDK is using, can be injected and configured with Dependency Injection (which deals with the cleanup as well) and otherwise set 1 HttpClient per instance of the API objects.
Metadata
Assignees
Labels
No labels
Activity