divyanshunegi
06/12/2021, 5:33 PMKtor
Implementation.
• It should have local SSL data encryption
• InternetConnectionCheck Interceptor
• ErrorHandlerInterceptor
• RetryRequest After RefreshToken Interceptor
• Few other custom interceptors
Earlier I was writing my APiClient in the commonMain
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 ?xxfast
06/13/2021, 2:19 AMcommonMain
by utilising ktor plugins for this. Although, i’m not sure how functionally different ktor plugins are for okhttp interceptors