Does anyone know if there is a way to have a ktor ...
# ktor
t
Does anyone know if there is a way to have a ktor client that has some base configuration/plugins and then use the same underlying client but apply different configurations on top of this? Essentially I want to be able to use the same client in order to not spin up new threads, but I want slightly different configurations depending on the endpoints I’m hitting.
s
I think you can achieve this by using the same HttpClientEngine to create multiple HttpClients
a
Unfortunately, you can only reconfigure a client by creating a new HttpClient instance https://api.ktor.io/ktor-client/ktor-client-core/io.ktor.client/-http-client/config.html.
👍 1