Hey everyone, I have pre existing Android applicat...
# multiplatform
v
Hey everyone, I have pre existing Android application using
OKHTTP
client with some`interceptors` and
authenticator
and iOS application using
alamofire
with
interceptors
.Both projects are huge in size. Now I want to use KMM for new api client. So How can I use these 2 http client through Ktor. I don't want to write from scratch in KMM module. Any suggestion?
y
There is a preconfigured option for ktor https://ktor.io/docs/http-client-engines.html#okhttp
v
@yschimke thanks for replying me. Can you give me any example for this? So I can get clear idea.
y
Not from my project but from the docs I linked to
Copy code
val client = HttpClient(OkHttp) {
    engine {
        ...
        preconfigured = okHttpClientInstance
    }
}
v
ok great thanks