With OkHttp
library, application is facing following SocketTimeoutException
issue. If request size is less, then it is working fine(Less than 1MB). I a
Use this for Kotlin
val client1 = OkHttpClient.Builder()
.connectTimeout(2, TimeUnit.MINUTES)
.writeTimeout(2, TimeUnit.MINUTES) // write timeout
.readTimeout(2, TimeUnit.MINUTES) // read timeout
.addInterceptor(
BasicAuthInterceptor(
AmvaccAppConstants.AUTHENTICATE_USER_NAME, AmvaccAppConstants.AUTHENTICATE_USER_PASSWORD
)
)
.addInterceptor(interceptor)
.build()