Okhttp: How to change timeout for a single request in okhttp

Created on 7 Nov 2017  路  1Comment  路  Source: square/okhttp

What kind of issue is this? - Question.

I asked in StackOverflow no one responded. So repeating same here :
https://stackoverflow.com/questions/46845206/how-to-change-timeout-for-a-request-in-okhttp

In general we set timeout for the okHttp client and we use single instance of that client. So, we can't change the timeout for that client once it's generated.

How to change the timeout for a particular request ?? Is there anyway to do it without creating new client??

It's very common that some calls take more time atleast 1/2 per app, which needs more timeout than others. it would be great if request object can override the default timeout.

stackoverflow

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings