[Docs] Networking documentation suggests poor use of HttpClient
viceroypenguin opened this issue · comments
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.
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.