Modifier and Type | Method and Description |
---|---|
OkHttpClient |
OkHttpClient.clone()
Returns a shallow copy of this OkHttpClient.
|
OkHttpClient |
OkHttpClient.setAuthenticator(OkAuthenticator authenticator)
Sets the authenticator used to respond to challenges from the remote web
server or proxy server.
|
OkHttpClient |
OkHttpClient.setCache(Cache cache) |
OkHttpClient |
OkHttpClient.setConnectionPool(ConnectionPool connectionPool)
Sets the connection pool used to recycle HTTP and HTTPS connections.
|
OkHttpClient |
OkHttpClient.setCookieHandler(CookieHandler cookieHandler)
Sets the cookie handler to be used to read outgoing cookies and write
incoming cookies.
|
OkHttpClient |
OkHttpClient.setFollowProtocolRedirects(boolean followProtocolRedirects)
Deprecated.
moved to
setFollowSslRedirects(boolean) . |
OkHttpClient |
OkHttpClient.setFollowSslRedirects(boolean followProtocolRedirects)
Configure this client to follow redirects from HTTPS to HTTP and from HTTP
to HTTPS.
|
OkHttpClient |
OkHttpClient.setHostnameVerifier(HostnameVerifier hostnameVerifier)
Sets the verifier used to confirm that response certificates apply to
requested hostnames for HTTPS connections.
|
OkHttpClient |
OkHttpClient.setOkResponseCache(OkResponseCache responseCache)
Deprecated.
replaced by
setCache(com.squareup.okhttp.Cache) which doesn't support custom
cache implementations. |
OkHttpClient |
OkHttpClient.setProtocols(List<Protocol> protocols)
Configure the protocols used by this client to communicate with remote
servers.
|
OkHttpClient |
OkHttpClient.setProxy(Proxy proxy)
Sets the HTTP proxy that will be used by connections created by this
client.
|
OkHttpClient |
OkHttpClient.setProxySelector(ProxySelector proxySelector)
Sets the proxy selection policy to be used if no
proxy
is specified explicitly. |
OkHttpClient |
OkHttpClient.setResponseCache(ResponseCache responseCache)
Deprecated.
replaced by
setCache(com.squareup.okhttp.Cache) which doesn't support custom
cache implementations. |
OkHttpClient |
OkHttpClient.setSslSocketFactory(SSLSocketFactory sslSocketFactory)
Sets the socket factory used to secure HTTPS connections.
|
OkHttpClient |
OkHttpClient.setTransports(List<String> transports)
Deprecated.
OkHttp 1.5 enforces an enumeration of
protocols
that can be selected. Please switch to setProtocols(java.util.List) . |
Copyright © 2014. All Rights Reserved.