Hi have anyone work with making <Ktor Client> and ...
# ktor
a
Hi have anyone work with making Ktor Client and Coil-Kt work together? I need to configure Ktor and Coil to use the same configuration, (Default Request, Interceptor, Auth, etc. etc.) But
Ktor
require
HttpClientEngine
but
Coil
needs the
OkHttpClient
itself. Is there a way to make both work together?
r
you can pass your
OkHttpClient
instance to Ktor client like this
Copy code
HttpClient(OkHttp) {
  engine { preconfigured = okHttpClient }
}
👍 1
😮 1
a
oh i see... thank you very much!