I’ve issue in building KMM project ```val ktorHtt...
# announcements
a
I’ve issue in building KMM project
Copy code
val ktorHttpClient = HttpClient(OkHttp) {

    engine {

    }
I need OkHttp in my HttpClient. This is in shared/commonMain. But commonMain not able to access OkHttp. If I add OkHttp in commonMain then getting build error.
Copy code
implementation ("io.ktor:ktor-client-okhttp:$ktorVersion")
Copy code
Failed building KotlinMPPGradleModel
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find ktor-client-okhttp-1.6.0-samplessources.jar (io.ktor:ktor-client-okhttp:1.6.0).
j
You should I believe be able to use "Default engine" approach outlined here https://ktor.io/docs/http-client-engines.html#default
btw there's #C0A974TJ9 and #C3PQML5NU channels that you might generally have better luck getting answers for questions like this in the future
👍 1
a
Thanks let me check 🙌
Actually I need to add some SSL CertificatePinner and interceptor I’m wondering if “Default Engine” will allow to add it
j
Hmm, possibly not then.... may be that you'll need to use some expect/actual setup....but worth asking in #C0A974TJ9
a
Sure, thanks