callTimeout

fun callTimeout(timeout: Long, unit: <Error class: unknown class>): OkHttpClient.Builder
fun callTimeout(duration: <Error class: unknown class>): OkHttpClient.Builder

Sets the default timeout for complete calls. A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds.

The call timeout spans the entire call: resolving DNS, connecting, writing the request body, server processing, and reading the response body. If the call requires redirects or retries all must complete within one timeout period.

The default value is 0 which imposes no timeout.