- Cache - Class in com.squareup.okhttp
-
Caches HTTP and HTTPS responses to the filesystem so they may be reused,
saving time and bandwidth.
- Cache(File, long) - Constructor for class com.squareup.okhttp.Cache
-
- CacheControl - Class in com.squareup.okhttp
-
A Cache-Control header with cache directives from a server or client.
- cacheControl(CacheControl) - Method in class com.squareup.okhttp.Request.Builder
-
Sets this request's Cache-Control
header, replacing any cache
control headers already present.
- cacheControl() - Method in class com.squareup.okhttp.Request
-
Returns the cache control directives for this response.
- cacheControl() - Method in class com.squareup.okhttp.Response
-
Returns the cache control directives for this response.
- CacheControl.Builder - Class in com.squareup.okhttp
-
Builds a Cache-Control
request header.
- CacheControl.Builder() - Constructor for class com.squareup.okhttp.CacheControl.Builder
-
- cacheResponse(Response) - Method in class com.squareup.okhttp.Response.Builder
-
- cacheResponse() - Method in class com.squareup.okhttp.Response
-
Returns the raw response received from the cache.
- Call - Class in com.squareup.okhttp
-
A call is a request that has been prepared for execution.
- Call(OkHttpClient, Request) - Constructor for class com.squareup.okhttp.Call
-
- Callback - Interface in com.squareup.okhttp
-
- cancel() - Method in class com.squareup.okhttp.Call
-
Cancels the request, if possible.
- cancel(Object) - Method in class com.squareup.okhttp.Dispatcher
-
Cancel all calls with the tag tag
.
- cancel(Object) - Method in class com.squareup.okhttp.OkHttpClient
-
Cancels all scheduled or in-flight calls tagged with tag
.
- CertificatePinner - Class in com.squareup.okhttp
-
Constrains which certificates are trusted.
- CertificatePinner.Builder - Class in com.squareup.okhttp
-
Builds a configured certificate pinner.
- CertificatePinner.Builder() - Constructor for class com.squareup.okhttp.CertificatePinner.Builder
-
- Challenge - Class in com.squareup.okhttp
-
An RFC 2617 challenge.
- Challenge(String, String) - Constructor for class com.squareup.okhttp.Challenge
-
- challenges() - Method in class com.squareup.okhttp.Response
-
Returns the authorization challenges appropriate for this response's code.
- charset() - Method in class com.squareup.okhttp.MediaType
-
Returns the charset of this media type, or null if this media type doesn't
specify a charset.
- charset(Charset) - Method in class com.squareup.okhttp.MediaType
-
Returns the charset of this media type, or defaultValue
if this
media type doesn't specify a charset.
- charStream() - Method in class com.squareup.okhttp.ResponseBody
-
Returns the response as a character stream decoded with the charset
of the Content-Type header.
- check(String, Certificate...) - Method in class com.squareup.okhttp.CertificatePinner
-
Confirms that at least one of the certificates pinned for hostname
is in peerCertificates
.
- CipherSuite - Enum in com.squareup.okhttp
-
- cipherSuite() - Method in class com.squareup.okhttp.Handshake
-
Returns a cipher suite name like "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA".
- cipherSuites(CipherSuite...) - Method in class com.squareup.okhttp.ConnectionSpec.Builder
-
- cipherSuites() - Method in class com.squareup.okhttp.ConnectionSpec
-
- CLEARTEXT - Static variable in class com.squareup.okhttp.ConnectionSpec
-
Unencrypted, unauthenticated connections for http:
URLs.
- clone() - Method in class com.squareup.okhttp.OkHttpClient
-
Returns a shallow copy of this OkHttpClient.
- close() - Method in class com.squareup.okhttp.Cache
-
- close() - Method in class com.squareup.okhttp.ResponseBody
-
- code(int) - Method in class com.squareup.okhttp.Response.Builder
-
- code() - Method in class com.squareup.okhttp.Response
-
Returns the HTTP status code.
- com.squareup.okhttp - package com.squareup.okhttp
-
- COMPATIBLE_TLS - Static variable in class com.squareup.okhttp.ConnectionSpec
-
A backwards-compatible fallback connection for interop with obsolete servers.
- Connection - Class in com.squareup.okhttp
-
The sockets and streams of an HTTP, HTTPS, or HTTPS+SPDY connection.
- Connection(ConnectionPool, Route) - Constructor for class com.squareup.okhttp.Connection
-
- ConnectionPool - Class in com.squareup.okhttp
-
Manages reuse of HTTP and SPDY connections for reduced network latency.
- ConnectionPool(int, long) - Constructor for class com.squareup.okhttp.ConnectionPool
-
- ConnectionSpec - Class in com.squareup.okhttp
-
Specifies configuration for the socket connection that HTTP traffic travels through.
- ConnectionSpec.Builder - Class in com.squareup.okhttp
-
- ConnectionSpec.Builder(ConnectionSpec) - Constructor for class com.squareup.okhttp.ConnectionSpec.Builder
-
- contentLength() - Method in class com.squareup.okhttp.RequestBody
-
- contentLength() - Method in class com.squareup.okhttp.ResponseBody
-
- contentType() - Method in class com.squareup.okhttp.RequestBody
-
Returns the Content-Type header for this body.
- contentType() - Method in class com.squareup.okhttp.ResponseBody
-
- create(MediaType, String) - Static method in class com.squareup.okhttp.RequestBody
-
Returns a new request body that transmits content
.
- create(MediaType, byte[]) - Static method in class com.squareup.okhttp.RequestBody
-
Returns a new request body that transmits content
.
- create(MediaType, File) - Static method in class com.squareup.okhttp.RequestBody
-
Returns a new request body that transmits the content of file
.
- Credentials - Class in com.squareup.okhttp
-
Factory for HTTP authorization credentials.
- get(Address) - Method in class com.squareup.okhttp.ConnectionPool
-
Returns a recycled connection to address
, or null if no such connection exists.
- get(SSLSession) - Static method in class com.squareup.okhttp.Handshake
-
- get(String, List<Certificate>, List<Certificate>) - Static method in class com.squareup.okhttp.Handshake
-
- get(String) - Method in class com.squareup.okhttp.Headers.Builder
-
Equivalent to build().get(name)
, but potentially faster.
- get(String) - Method in class com.squareup.okhttp.Headers
-
Returns the last value corresponding to the specified field, or null.
- get(String) - Static method in enum com.squareup.okhttp.Protocol
-
Returns the protocol identified by protocol
.
- get() - Method in class com.squareup.okhttp.Request.Builder
-
- getAddress() - Method in class com.squareup.okhttp.Route
-
- getAuthenticator() - Method in class com.squareup.okhttp.Address
-
Returns the client's authenticator.
- getAuthenticator() - Method in class com.squareup.okhttp.OkHttpClient
-
- getCache() - Method in class com.squareup.okhttp.OkHttpClient
-
- getCertificatePinner() - Method in class com.squareup.okhttp.OkHttpClient
-
- getConnectionCount() - Method in class com.squareup.okhttp.ConnectionPool
-
Returns total number of connections in the pool.
- getConnectionPool() - Method in class com.squareup.okhttp.OkHttpClient
-
- getConnectionSpec() - Method in class com.squareup.okhttp.Route
-
- getConnectionSpecs() - Method in class com.squareup.okhttp.Address
-
- getConnectionSpecs() - Method in class com.squareup.okhttp.OkHttpClient
-
- getConnectTimeout() - Method in class com.squareup.okhttp.OkHttpClient
-
Default connect timeout (in milliseconds).
- getCookieHandler() - Method in class com.squareup.okhttp.OkHttpClient
-
- getDate(String) - Method in class com.squareup.okhttp.Headers
-
Returns the last value corresponding to the specified field parsed as an
HTTP date, or null if either the field is absent or cannot be parsed as a
date.
- getDefault() - Static method in class com.squareup.okhttp.ConnectionPool
-
- getDirectory() - Method in class com.squareup.okhttp.Cache
-
- getDispatcher() - Method in class com.squareup.okhttp.OkHttpClient
-
- getExecutorService() - Method in class com.squareup.okhttp.Dispatcher
-
- getFollowRedirects() - Method in class com.squareup.okhttp.OkHttpClient
-
- getFollowSslRedirects() - Method in class com.squareup.okhttp.OkHttpClient
-
- getHandshake() - Method in class com.squareup.okhttp.Connection
-
- getHitCount() - Method in class com.squareup.okhttp.Cache
-
- getHostnameVerifier() - Method in class com.squareup.okhttp.Address
-
Returns the hostname verifier, or null if this is not an HTTPS
address.
- getHostnameVerifier() - Method in class com.squareup.okhttp.OkHttpClient
-
- getHttpConnectionCount() - Method in class com.squareup.okhttp.ConnectionPool
-
Returns total number of http connections in the pool.
- getMaxRequests() - Method in class com.squareup.okhttp.Dispatcher
-
- getMaxRequestsPerHost() - Method in class com.squareup.okhttp.Dispatcher
-
- getMaxSize() - Method in class com.squareup.okhttp.Cache
-
- getNetworkCount() - Method in class com.squareup.okhttp.Cache
-
- getProtocol() - Method in class com.squareup.okhttp.Connection
-
Returns the protocol negotiated by this connection, or
Protocol.HTTP_1_1
if no protocol has been negotiated.
- getProtocols() - Method in class com.squareup.okhttp.Address
-
Returns the protocols the client supports.
- getProtocols() - Method in class com.squareup.okhttp.OkHttpClient
-
- getProxy() - Method in class com.squareup.okhttp.Address
-
Returns this address's explicitly-specified HTTP proxy, or null to
delegate to the HTTP client's proxy selector.
- getProxy() - Method in class com.squareup.okhttp.OkHttpClient
-
- getProxy() - Method in class com.squareup.okhttp.Route
-
Returns the Proxy
of this route.
- getProxySelector() - Method in class com.squareup.okhttp.OkHttpClient
-
- getReadTimeout() - Method in class com.squareup.okhttp.OkHttpClient
-
Default read timeout (in milliseconds).
- getRealm() - Method in class com.squareup.okhttp.Challenge
-
Returns the protection space.
- getRequestCount() - Method in class com.squareup.okhttp.Cache
-
- getRoute() - Method in class com.squareup.okhttp.Connection
-
Returns the route used by this connection.
- getScheme() - Method in class com.squareup.okhttp.Challenge
-
Returns the authentication scheme, like Basic
.
- getSize() - Method in class com.squareup.okhttp.Cache
-
- getSocket() - Method in class com.squareup.okhttp.Connection
-
Returns the socket that this connection uses, or null if the connection
is not currently connected.
- getSocketAddress() - Method in class com.squareup.okhttp.Route
-
- getSocketFactory() - Method in class com.squareup.okhttp.Address
-
Returns the socket factory for new connections.
- getSocketFactory() - Method in class com.squareup.okhttp.OkHttpClient
-
- getSpdyConnectionCount() - Method in class com.squareup.okhttp.ConnectionPool
-
Returns total number of spdy connections in the pool.
- getSslSocketFactory() - Method in class com.squareup.okhttp.Address
-
Returns the SSL socket factory, or null if this is not an HTTPS
address.
- getSslSocketFactory() - Method in class com.squareup.okhttp.OkHttpClient
-
- getUriHost() - Method in class com.squareup.okhttp.Address
-
Returns the hostname of the origin server.
- getUriPort() - Method in class com.squareup.okhttp.Address
-
Returns the port of the origin server; typically 80 or 443.
- getWriteAbortCount() - Method in class com.squareup.okhttp.Cache
-
- getWriteSuccessCount() - Method in class com.squareup.okhttp.Cache
-
- getWriteTimeout() - Method in class com.squareup.okhttp.OkHttpClient
-
Default write timeout (in milliseconds).
- set(String, String) - Method in class com.squareup.okhttp.Headers.Builder
-
Set a field with the specified value.
- setAuthenticator(Authenticator) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the authenticator used to respond to challenges from the remote web
server or proxy server.
- setCache(Cache) - Method in class com.squareup.okhttp.OkHttpClient
-
- setCertificatePinner(CertificatePinner) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the certificate pinner that constrains which certificates are trusted.
- setConnectionPool(ConnectionPool) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the connection pool used to recycle HTTP and HTTPS connections.
- setConnectionSpecs(List<ConnectionSpec>) - Method in class com.squareup.okhttp.OkHttpClient
-
- setConnectTimeout(long, TimeUnit) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the default connect timeout for new connections.
- setCookieHandler(CookieHandler) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the cookie handler to be used to read outgoing cookies and write
incoming cookies.
- setDispatcher(Dispatcher) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the dispatcher used to set policy and execute asynchronous requests.
- setFollowRedirects(boolean) - Method in class com.squareup.okhttp.OkHttpClient
-
Configure this client to follow redirects.
- setFollowSslRedirects(boolean) - Method in class com.squareup.okhttp.OkHttpClient
-
Configure this client to follow redirects from HTTPS to HTTP and from HTTP
to HTTPS.
- setHostnameVerifier(HostnameVerifier) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the verifier used to confirm that response certificates apply to
requested hostnames for HTTPS connections.
- setMaxRequests(int) - Method in class com.squareup.okhttp.Dispatcher
-
Set the maximum number of requests to execute concurrently.
- setMaxRequestsPerHost(int) - Method in class com.squareup.okhttp.Dispatcher
-
Set the maximum number of requests for each host to execute concurrently.
- setProtocols(List<Protocol>) - Method in class com.squareup.okhttp.OkHttpClient
-
Configure the protocols used by this client to communicate with remote
servers.
- setProxy(Proxy) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the HTTP proxy that will be used by connections created by this
client.
- setProxySelector(ProxySelector) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the proxy selection policy to be used if no
proxy
is specified explicitly.
- setReadTimeout(long, TimeUnit) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the default read timeout for new connections.
- setSocketFactory(SocketFactory) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the socket factory used to create connections.
- setSslSocketFactory(SSLSocketFactory) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the socket factory used to secure HTTPS connections.
- setWriteTimeout(long, TimeUnit) - Method in class com.squareup.okhttp.OkHttpClient
-
Sets the default write timeout for new connections.
- size() - Method in class com.squareup.okhttp.Headers
-
Returns the number of field values.
- sMaxAgeSeconds() - Method in class com.squareup.okhttp.CacheControl
-
The "s-maxage" directive is the max age for shared caches.
- source() - Method in class com.squareup.okhttp.ResponseBody
-
- string() - Method in class com.squareup.okhttp.ResponseBody
-
Returns the response as a string decoded with the charset of the
Content-Type header.
- subtype() - Method in class com.squareup.okhttp.MediaType
-
Returns a specific media subtype, such as "plain" or "png", "mpeg",
"mp4" or "xml".
- supportsTlsExtensions(boolean) - Method in class com.squareup.okhttp.ConnectionSpec.Builder
-
- supportsTlsExtensions() - Method in class com.squareup.okhttp.ConnectionSpec
-