Java com.squareup.okhttp OkHttpClient fields, constructors, methods, implement or subclass

Example usage for Java com.squareup.okhttp OkHttpClient fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.squareup.okhttp OkHttpClient.

The text is from its open source code.

Subclass

com.squareup.okhttp.OkHttpClient has subclasses.
Click this link to see all its subclasses.

Field

Constructor

Method

OkHttpClientclone()
Returns a shallow copy of this OkHttpClient.
AuthenticatorgetAuthenticator()
CachegetCache()
CertificatePinnergetCertificatePinner()
ConnectionPoolgetConnectionPool()
ListgetConnectionSpecs()
intgetConnectTimeout()
Default connect timeout (in milliseconds).
CookieHandlergetCookieHandler()
DispatchergetDispatcher()
booleangetFollowRedirects()
booleangetFollowSslRedirects()
HostnameVerifiergetHostnameVerifier()
ListgetProtocols()
ProxygetProxy()
ProxySelectorgetProxySelector()
intgetReadTimeout()
Default read timeout (in milliseconds).
booleangetRetryOnConnectionFailure()
SocketFactorygetSocketFactory()
SSLSocketFactorygetSslSocketFactory()
intgetWriteTimeout()
Default write timeout (in milliseconds).
CallnewCall(Request request)
Prepares the request to be executed at some point in the future.
OkHttpClientsetAuthenticator(Authenticator authenticator)
Sets the authenticator used to respond to challenges from the remote web server or proxy server.
OkHttpClientsetCache(Cache cache)
OkHttpClientsetCertificatePinner(CertificatePinner certificatePinner)
Sets the certificate pinner that constrains which certificates are trusted.
OkHttpClientsetConnectionPool(ConnectionPool connectionPool)
Sets the connection pool used to recycle HTTP and HTTPS connections.
OkHttpClientsetConnectionSpecs(List connectionSpecs)
voidsetConnectTimeout(long timeout, TimeUnit unit)
Sets the default connect timeout for new connections.
OkHttpClientsetCookieHandler(CookieHandler cookieHandler)
Sets the cookie handler to be used to read outgoing cookies and write incoming cookies.
OkHttpClientsetDispatcher(Dispatcher dispatcher)
Sets the dispatcher used to set policy and execute asynchronous requests.
voidsetFollowRedirects(boolean followRedirects)
Configure this client to follow redirects.
OkHttpClientsetFollowSslRedirects(boolean followProtocolRedirects)
Configure this client to follow redirects from HTTPS to HTTP and from HTTP to HTTPS.
OkHttpClientsetHostnameVerifier(HostnameVerifier hostnameVerifier)
Sets the verifier used to confirm that response certificates apply to requested hostnames for HTTPS connections.
OkHttpClientsetProtocols(List protocols)
Configure the protocols used by this client to communicate with remote servers.
OkHttpClientsetProxy(Proxy proxy)
Sets the HTTP proxy that will be used by connections created by this client.
OkHttpClientsetProxySelector(ProxySelector proxySelector)
Sets the proxy selection policy to be used if no #setProxy proxy is specified explicitly.
voidsetReadTimeout(long timeout, TimeUnit unit)
Sets the default read timeout for new connections.
voidsetRetryOnConnectionFailure(boolean retryOnConnectionFailure)
Configure this client to retry or not when a connectivity problem is encountered.
OkHttpClientsetSocketFactory(SocketFactory socketFactory)
Sets the socket factory used to create connections.
OkHttpClientsetSslSocketFactory(SSLSocketFactory sslSocketFactory)
Sets the socket factory used to secure HTTPS connections.
voidsetWriteTimeout(long timeout, TimeUnit unit)
Sets the default write timeout for new connections.