divyanshunegi
06/12/2021, 10:14 AMcommonMain
but as I can see it does not support addInterceptor property by default, which is available in OkHttp for Android.
So the new plan I had is create an expect class APiClient in common main and implement APIClient for Android on AndroidMain with OkHttp engine and APiClient on iOSMain with IOS Engine.
Is this approach right ? or am I missing some part ?CLOVIS
06/12/2021, 11:01 AMexpect-actual
stuff you need to write Multiplatform clients from the get go.divyanshunegi
06/12/2021, 3:37 PMengine {
addInterceptor()
}
This only works if I use OkHttp
engine on ktor which will only work on the Android side, I want to do this on iOS side as well bit IOS
ktor engine does not support this.CLOVIS
06/12/2021, 4:44 PMengine {}
, of course, as that can't be Multiplatformdivyanshunegi
06/12/2021, 5:32 PMRak
06/14/2021, 8:04 AM