Example usage for Java com.squareup.okhttp OkHttpClient fields, constructors, methods, implement or subclass
The text is from its open source code.
List | interceptors |
List | networkInterceptors |
OkHttpClient | clone() Returns a shallow copy of this OkHttpClient. |
Authenticator | getAuthenticator() |
Cache | getCache() |
CertificatePinner | getCertificatePinner() |
ConnectionPool | getConnectionPool() |
List | getConnectionSpecs() |
int | getConnectTimeout() Default connect timeout (in milliseconds). |
CookieHandler | getCookieHandler() |
Dispatcher | getDispatcher() |
boolean | getFollowRedirects() |
boolean | getFollowSslRedirects() |
HostnameVerifier | getHostnameVerifier() |
List | getProtocols() |
Proxy | getProxy() |
ProxySelector | getProxySelector() |
int | getReadTimeout() Default read timeout (in milliseconds). |
boolean | getRetryOnConnectionFailure() |
SocketFactory | getSocketFactory() |
SSLSocketFactory | getSslSocketFactory() |
int | getWriteTimeout() Default write timeout (in milliseconds). |
Call | newCall(Request request) Prepares the request to be executed at some point in the future. |
OkHttpClient | setAuthenticator(Authenticator authenticator) Sets the authenticator used to respond to challenges from the remote web server or proxy server. |
OkHttpClient | setCache(Cache cache) |
OkHttpClient | setCertificatePinner(CertificatePinner certificatePinner) Sets the certificate pinner that constrains which certificates are trusted. |
OkHttpClient | setConnectionPool(ConnectionPool connectionPool) Sets the connection pool used to recycle HTTP and HTTPS connections. |
OkHttpClient | setConnectionSpecs(List |
void | setConnectTimeout(long timeout, TimeUnit unit) Sets the default connect timeout for new connections. |
OkHttpClient | setCookieHandler(CookieHandler cookieHandler) Sets the cookie handler to be used to read outgoing cookies and write incoming cookies. |
OkHttpClient | setDispatcher(Dispatcher dispatcher) Sets the dispatcher used to set policy and execute asynchronous requests. |
void | setFollowRedirects(boolean followRedirects) Configure this client to follow redirects. |
OkHttpClient | setFollowSslRedirects(boolean followProtocolRedirects) Configure this client to follow redirects from HTTPS to HTTP and from HTTP to HTTPS. |
OkHttpClient | setHostnameVerifier(HostnameVerifier hostnameVerifier) Sets the verifier used to confirm that response certificates apply to requested hostnames for HTTPS connections. |
OkHttpClient | setProtocols(List Configure the protocols used by this client to communicate with remote servers. |
OkHttpClient | setProxy(Proxy proxy) Sets the HTTP proxy that will be used by connections created by this client. |
OkHttpClient | setProxySelector(ProxySelector proxySelector) Sets the proxy selection policy to be used if no #setProxy proxy is specified explicitly. |
void | setReadTimeout(long timeout, TimeUnit unit) Sets the default read timeout for new connections. |
void | setRetryOnConnectionFailure(boolean retryOnConnectionFailure) Configure this client to retry or not when a connectivity problem is encountered. |
OkHttpClient | setSocketFactory(SocketFactory socketFactory) Sets the socket factory used to create connections. |
OkHttpClient | setSslSocketFactory(SSLSocketFactory sslSocketFactory) Sets the socket factory used to secure HTTPS connections. |
void | setWriteTimeout(long timeout, TimeUnit unit) Sets the default write timeout for new connections. |