I have a small trouble with okhttp.
How to set a connect time (for ex. 10 sec and this 10 sec okhttp lib should try to get a response from server)?
How to set a connect tries (for ex. when this 10 sec is ended)?
I have a small trouble with okhttp.
How to set a connect time (for ex. 10 sec and this 10 sec okhttp lib should try to get a response from server)?
How to set a connect tries (for ex. when this 10 sec is ended)?
client = new OkHttpClient();
client.setConnectTimeout(10, TimeUnit.SECONDS);
client.setReadTimeout(10, TimeUnit.SECONDS);
client.setWriteTimeout(10, TimeUnit.SECONDS);