✅ Best practice when using HttpClient in a class
I have a class which essentially acts as a wrapper over an HttpClient as an abstraction for a web API. This class has a field
private readonly HttpClient client; which is currently set through the constructor of the class, where I'm just kind of expecting the consuming code to have configured the base address and any other configuration in regards to the client itself. However, I don't know if this is considered good practice, or if there's some other way I'm not aware of. This class should also be usable with DI, so I don't know if I instead should have an IHttpClientFactory in the constructor or something instead.