Vivek Mittal
07/18/2023, 2:03 PMsockettimeoutexception
when I make a call to an API using ktor/okhttp. The exception can be handled and I will also fix the API at some point.
The question here is how do I change the timeout interval? The exception is generated after 10 seconds. I have tried a few things which I can get my hands on, but nothing worked. I would really appreciate any help.Kilian
07/18/2023, 2:06 PMprivate fun buildClient(): HttpClient {
return HttpClient(CIO) *{*
install(HttpTimeout) *{*
requestTimeoutMillis = params.httpClientTimeout
}
}
}
Vivek Mittal
07/18/2023, 2:18 PMVivek Mittal
07/18/2023, 2:25 PMconnectTimeout
, I need to configure all three, read/write/connectVivek Mittal
07/18/2023, 2:26 PM