Skip to content
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

[Docs] Networking documentation suggests poor use of HttpClient #175

Open
viceroypenguin opened this issue Nov 8, 2021 · 1 comment
Open

Comments

@viceroypenguin
Copy link

Current recommended use of HttpClient is defined in this document.

One should not create a new HttpClient for each request, neither should one use a single HttpClient for the entire application. Instead, the DI system should be used to receive an HttpClient, either directly or indirectly, depending on use and configuration.

I have not used MADE.NET, so I do not know the best way to suggest the proper use of HttpClient, but documentation should be updated to reflect modern recommended practices.

@jamesmcroft
Copy link
Member

Thanks for bringing this to my attention 👍🏻

I'll look into improving the documentation for MADE to reflect usage with the HttpClientFactory approach 😄

It should be relatively straight forward. For network requests, you will just pass the client created by the factory. There may be some improvements that can be made to the request manager though to support DI with the factory itself.

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

No branches or pull requests

2 participants