| Constructor and Description |
|---|
Builder() |
public Client.Builder callTimeout(long timeout, TimeUnit unit)
public Client.Builder callTimeout(Duration duration)
public Client.Builder connectTimeout(long timeout, TimeUnit unit)
public Client.Builder connectTimeout(Duration duration)
public Client.Builder readTimeout(long timeout, TimeUnit unit)
public Client.Builder readTimeout(Duration duration)
public Client.Builder writeTimeout(long timeout, TimeUnit unit)
public Client.Builder writeTimeout(Duration duration)
public Client.Builder pingInterval(long interval, TimeUnit unit)
public Client.Builder pingInterval(Duration duration)
public Client.Builder proxy(Proxy proxy)
public Client.Builder proxySelector(ProxySelector proxySelector)
public Client.Builder cookieJar(CookieJar cookieJar)
public Client.Builder cache(Cache cache)
public Client.Builder dns(Dns dns)
public Client.Builder socketFactory(SocketFactory socketFactory)
public Client.Builder sslSocketFactory(SSLSocketFactory sslSocketFactory)
public Client.Builder sslSocketFactory(SSLSocketFactory sslSocketFactory, X509TrustManager trustManager)
public Client.Builder hostnameVerifier(HostnameVerifier hostnameVerifier)
public Client.Builder certificatePinner(CertificatePinner certificatePinner)
public Client.Builder authenticator(Authenticator authenticator)
public Client.Builder proxyAuthenticator(Authenticator proxyAuthenticator)
public Client.Builder connectionPool(ConnectionPool connectionPool)
public Client.Builder followSslRedirects(boolean followProtocolRedirects)
public Client.Builder followRedirects(boolean followRedirects)
public Client.Builder retryOnConnectionFailure(boolean retryOnConnectionFailure)
public Client.Builder dispatcher(Dispatcher dispatcher)
public Client.Builder protocols(List<Protocol> protocols)
The following protocols are currently supported:
This is an evolving set. Future releases include support for transitional protocols. The http/1.1 transport will never be dropped.
If multiple protocols are specified, ALPN will be used to negotiate a transport. Protocol negotiation is only attempted for HTTPS URLs.
Protocol.HTTP_1_0 is not supported in this set. Requests are initiated with HTTP/1.1. If the server responds with HTTP/1.0, that will be exposed by Response.protocol().
protocols - the protocols to use, in order of preference. If the list contains Protocol.H2_PRIOR_KNOWLEDGE then that must be the only protocol and HTTPS URLs will not
be supported. Otherwise the list must contain Protocol.HTTP_1_1. The list must
not contain null or Protocol.HTTP_1_0.public Client.Builder connectionSpecs(List<ConnectionSpec> connectionSpecs)
public List<Interceptor> interceptors()
public Client.Builder addInterceptor(Interceptor interceptor)
public List<Interceptor> networkInterceptors()
public Client.Builder addNetworkInterceptor(Interceptor interceptor)
public Client.Builder eventListener(EventListener eventListener)
public Client.Builder eventListenerFactory(EventListener.Factory eventListenerFactory)
public Client build()
Copyright © 2019. All rights reserved.