Are you supposed to create different `HttpClient`s...
# ktor
a
Are you supposed to create different `HttpClient`s for different API or is it recommend to share a single instance across your service? It would be nice to set default headers and stuff but when using multiple APIs that isn’t ideal since you have to check the URL host before doing anything
e
Hi @ansman, you could use
.config
method to get different pipelines for the single instance of engine.
You also could create new instance of the client
a
Right, I’m mostly wondering since you cannot pass for example a preconfigured OkHttp instance which would be nice since OkHttp recommends that you should share instances
e
It could be a nice feature. You could file an issue or PR 🙂
a
Will do 👍