-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject Ioc-managed HttpClient for MinioClient via constructor #675
Comments
PR #681 only addresses the 2nd bullet in the description of this issue above by cleaning up the previously created HttpClient instance, before creating a new one which happens when |
The team's decision is to go with builder pattern in methods, and this decision is valid for all MinIO implementations where ever it is applicable. |
* Created when there is still no HttpClient available during Build(). * WithHttpClient(HttpClient) adds parameter bool disposeHttpClient = false to indicate whether to dispose httpClient. * Fix unit tests * run "cleanupcode minio.sln"
In version 4.0.4 we had the
MinioClient(HttpClient httpClient)
constructor which unfortunately is now marked obsolete:services.AddHttpClient<MinioClient>()
to inject HttpClient.MinioClient(bool createHttpClient = true)
, to control whether to create in the constructor or not.The text was updated successfully, but these errors were encountered: