Skip to content

Optimize HttpClient usage in MultiTenantOptions to use a single static instance #33

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

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

drittich
Copy link
Contributor

This pull request resolves #32.

I decided to go with the simpler static HttpClient instance rather than IHttpClientFactory as the latter requires an additional dependency injection. Since HttpClient is only likely to get used a few times, I think this is acceptable.

@1bberto
Copy link
Member

1bberto commented Feb 10, 2025

I don't expect this to bring a huge performance improvement, since this section of the code is only used during the application startup.
Tho an improvement is always welcome :) tks a lot @drittich !!

@1bberto 1bberto merged commit 8620f05 into Pub-Dev:main Feb 10, 2025
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of HttpClient in MultiTenantOptions class is not ideal
2 participants