Closed girionis closed 4 years ago
Ok I think I have found it. I forked the default http client and passed it as argument to the httpPost
val customClient = defaultHttpClient.fork {
readTimeout = 30000
connectTimeout = 30000
writeTimeout = 30000
}
and then httpPost(client = customClient)
Hi @girionis, thanks for your question.
You found one of the right ways to do it with client fork fork
.
In general, we support two options at the moment.
Very welcome, if you have any suggestion how we can make docs better.
Hello Sergei, thank you for your prompt reply. I had to look at the source code in order to find out how to do it, so maybe you could add the part where you set the client in the httpPost?
In any case congratulations again for the great library you have given us. Keep up the good work.
Regards
Panos
Thanks Panos,
Would definitely consider adding the example of passing a client
Hello, I am using kohttp with dsl to send a post request
val response: Response = httpPost {...
any idea how I can set a read/connect timeout? I would appreciate any sample code.
Thank you
Panos