public interface OkHttpClientBuilder
okhttp3.OkHttpClient build()
OkHttpClientBuilder proxy(Proxy proxy)
proxy - ProxyOkHttpClientBuilder authenticator(okhttp3.Authenticator authenticator)
authenticator - AuthenticatorOkHttpClientBuilder addInterceptor(okhttp3.Interceptor interceptor)
interceptor - InterceptorOkHttpClientBuilder setDispatcher(okhttp3.Dispatcher dispatcher)
dispatcher - DispatcherOkHttpClientBuilder setConnectionPool(okhttp3.ConnectionPool connectionPool)
connectionPool - ConnectionPoolOkHttpClientBuilder setEventListenerFactory(okhttp3.EventListener.Factory eventListenerFactory)
eventListenerFactory - EventListenerOkHttpClientBuilder setRetryOnConnectionFailure(Boolean retryOnConnectionFailure)
retryOnConnectionFailure - retryOnConnectionFailureOkHttpClientBuilder setFollowRedirects(Boolean followRedirects)
followRedirects - followRedirectsOkHttpClientBuilder connectTimeout(Long timeout, TimeUnit unit)
timeout - 时长unit - 时间单位OkHttpClientBuilder callTimeout(Long timeout, TimeUnit unit)
timeout - 时长unit - 时间单位OkHttpClientBuilder readTimeout(Long timeout, TimeUnit unit)
timeout - 时长unit - 时间单位OkHttpClientBuilder writeTimeout(Long timeout, TimeUnit unit)
timeout - 时长unit - 时间单位OkHttpClientBuilder setPingInterval(Integer pingInterval)
pingInterval - ping的时间间隔Copyright © 2024. All rights reserved.