Closed
Description
In the latest version of this library, creating a StripeClient
with the minimal constructor creates a new SystemNetHttpClient
, which in turn creates a new HttpClient
.
In some cases, multiple StripeClient
s need to be created in an application (e.g. when dealing with multiple Stripe accounts, each with a different API key).
The "best practices" for HttpClient instances are mentioned by Microsoft as follows:
HttpClient is intended to be instantiated once and reused throughout the life of an application.
My questions:
- Why isn't
SystemNetHttpClient
using a static, application-wideHttpClient
instance? - When passing a custom
SystemNetHttpClient
instance toStripeClient
, is there any danger in using a static, application-wideHttpClient
instance?
Metadata
Assignees
Labels
No labels
Activity