I see that the HttpClient is declared in the data ...
# touchlab-tools
t
I see that the HttpClient is declared in the data source. Is there a reason why the HttpClient instance wasn't injected into the data source? I'm asking because my app has to connect to two different servers that use the same auth token. It would be cool if I could share the HttpClient and leverage the bearer logic to refresh the token when necessary. Would that be a bad design?
r
In KaMPKit we instantiate the client in-place and just inject the engine since that's the platform-specific component. But if you were using the client in multiple places then injecting it would probably be a good move.
👍 2