- add(String, String...) - Method in class okhttp3.CertificatePinner.Builder
-
Pins certificates for pattern
.
- add(String, String) - Method in class okhttp3.FormBody.Builder
-
- add(String) - Method in class okhttp3.Headers.Builder
-
Add an header line containing a field name, a literal colon, and a value.
- add(String, String) - Method in class okhttp3.Headers.Builder
-
Add a header with the specified name and value.
- add(String, Date) - Method in class okhttp3.Headers.Builder
-
Add a header with the specified name and formatted date.
- add(String, Instant) - Method in class okhttp3.Headers.Builder
-
Add a header with the specified name and formatted instant.
- addAll(Headers) - Method in class okhttp3.Headers.Builder
-
Adds all headers from an existing collection.
- addEncoded(String, String) - Method in class okhttp3.FormBody.Builder
-
- addEncodedPathSegment(String) - Method in class okhttp3.HttpUrl.Builder
-
- addEncodedPathSegments(String) - Method in class okhttp3.HttpUrl.Builder
-
Adds a set of encoded path segments separated by a slash (either \
or /
).
- addEncodedQueryParameter(String, String) - Method in class okhttp3.HttpUrl.Builder
-
Adds the pre-encoded query parameter to this URL's query string.
- addFormDataPart(String, String) - Method in class okhttp3.MultipartBody.Builder
-
Add a form data part to the body.
- addFormDataPart(String, String, RequestBody) - Method in class okhttp3.MultipartBody.Builder
-
Add a form data part to the body.
- addHeader(String, String) - Method in class okhttp3.Request.Builder
-
Adds a header with name
and value
.
- addHeader(String, String) - Method in class okhttp3.Response.Builder
-
Adds a header with name
and value
.
- addInterceptor(Interceptor) - Method in class okhttp3.OkHttpClient.Builder
-
- addNetworkInterceptor(Interceptor) - Method in class okhttp3.OkHttpClient.Builder
-
- addPart(RequestBody) - Method in class okhttp3.MultipartBody.Builder
-
Add a part to the body.
- addPart(Headers, RequestBody) - Method in class okhttp3.MultipartBody.Builder
-
Add a part to the body.
- addPart(MultipartBody.Part) - Method in class okhttp3.MultipartBody.Builder
-
Add a part to the body.
- addPathSegment(String) - Method in class okhttp3.HttpUrl.Builder
-
- addPathSegments(String) - Method in class okhttp3.HttpUrl.Builder
-
Adds a set of path segments separated by a slash (either \
or /
).
- addQueryParameter(String, String) - Method in class okhttp3.HttpUrl.Builder
-
Encodes the query parameter using UTF-8 and adds it to this URL's query string.
- Address - Class in okhttp3
-
A specification for a connection to an origin server.
- Address(String, int, Dns, SocketFactory, SSLSocketFactory, HostnameVerifier, CertificatePinner, Authenticator, Proxy, List<Protocol>, List<ConnectionSpec>, ProxySelector) - Constructor for class okhttp3.Address
-
- address() - Method in class okhttp3.Route
-
- addUnsafeNonAscii(String, String) - Method in class okhttp3.Headers.Builder
-
Add a header with the specified name and value.
- allEnabledCipherSuites() - Method in class okhttp3.ConnectionSpec.Builder
-
- allEnabledTlsVersions() - Method in class okhttp3.ConnectionSpec.Builder
-
- ALTERNATIVE - Static variable in class okhttp3.MultipartBody
-
The "multipart/alternative" type is syntactically identical to "multipart/mixed", but the
semantics are different.
- authenticate(Route, Response) - Method in interface okhttp3.Authenticator
-
Returns a request that includes a credential to satisfy an authentication challenge in response
.
- Authenticator - Interface in okhttp3
-
Performs either preemptive authentication before connecting to a proxy server,
or reactive authentication after receiving a challenge from either an origin web
server or proxy server.
- authenticator() - Method in class okhttp3.OkHttpClient
-
- authenticator(Authenticator) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the authenticator used to respond to challenges from origin servers.
- authParams() - Method in class okhttp3.Challenge
-
Returns the auth params, including realm
and charset
if present, but as
strings.
- Cache - Class in okhttp3
-
Caches HTTP and HTTPS responses to the filesystem so they may be reused, saving time and
bandwidth.
- Cache(File, long) - Constructor for class okhttp3.Cache
-
Create a cache of at most maxSize
bytes in directory
.
- cache(Cache) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the response cache to be used to read and write cached responses.
- cache() - Method in class okhttp3.OkHttpClient
-
- CacheControl - Class in okhttp3
-
A Cache-Control header with cache directives from a server or client.
- cacheControl(CacheControl) - Method in class okhttp3.Request.Builder
-
Sets this request's Cache-Control
header, replacing any cache control headers already
present.
- cacheControl() - Method in class okhttp3.Request
-
Returns the cache control directives for this response.
- cacheControl() - Method in class okhttp3.Response
-
Returns the cache control directives for this response.
- CacheControl.Builder - Class in okhttp3
-
Builds a Cache-Control
request header.
- cacheResponse(Response) - Method in class okhttp3.Response.Builder
-
- cacheResponse() - Method in class okhttp3.Response
-
Returns the raw response received from the cache.
- Call - Interface in okhttp3
-
A call is a request that has been prepared for execution.
- call() - Method in interface okhttp3.Interceptor.Chain
-
- Call.Factory - Interface in okhttp3
-
- Callback - Interface in okhttp3
-
- callEnd(Call) - Method in class okhttp3.EventListener
-
Invoked immediately after a call has completely ended.
- callFailed(Call, IOException) - Method in class okhttp3.EventListener
-
Invoked when a call fails permanently.
- callStart(Call) - Method in class okhttp3.EventListener
-
Invoked as soon as a call is enqueued or executed by a client.
- callTimeout(long, TimeUnit) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the default timeout for complete calls.
- callTimeout(Duration) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the default timeout for complete calls.
- callTimeoutMillis() - Method in class okhttp3.OkHttpClient
-
Default call timeout (in milliseconds).
- cancel() - Method in interface okhttp3.Call
-
Cancels the request, if possible.
- cancel() - Method in interface okhttp3.WebSocket
-
Immediately and violently release resources held by this web socket, discarding any enqueued
messages.
- cancelAll() - Method in class okhttp3.Dispatcher
-
Cancel all calls currently enqueued or executing.
- certificatePinner() - Method in class okhttp3.Address
-
Returns this address's certificate pinner, or null if this is not an HTTPS address.
- CertificatePinner - Class in okhttp3
-
Constrains which certificates are trusted.
- certificatePinner(CertificatePinner) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the certificate pinner that constrains which certificates are trusted.
- certificatePinner() - Method in class okhttp3.OkHttpClient
-
- CertificatePinner.Builder - Class in okhttp3
-
Builds a configured certificate pinner.
- Challenge - Class in okhttp3
-
An RFC 7235 challenge.
- Challenge(String, Map<String, String>) - Constructor for class okhttp3.Challenge
-
- Challenge(String, String) - Constructor for class okhttp3.Challenge
-
- challenges() - Method in class okhttp3.Response
-
Returns the RFC 7235 authorization challenges appropriate for this response's code.
- charset() - Method in class okhttp3.Challenge
-
Returns the charset that should be used to encode the credentials.
- charset() - Method in class okhttp3.MediaType
-
Returns the charset of this media type, or null if this media type doesn't specify a charset.
- charset(Charset) - Method in class okhttp3.MediaType
-
Returns the charset of this media type, or defaultValue
if either this media type
doesn't specify a charset, of it its charset is unsupported by the current runtime.
- charStream() - Method in class okhttp3.ResponseBody
-
Returns the response as a character stream.
- check(String, List<Certificate>) - Method in class okhttp3.CertificatePinner
-
Confirms that at least one of the certificates pinned for hostname
is in peerCertificates
.
- check(String, Certificate...) - Method in class okhttp3.CertificatePinner
-
- CipherSuite - Class in okhttp3
-
- cipherSuite() - Method in class okhttp3.Handshake
-
Returns the cipher suite used for the connection.
- cipherSuites(CipherSuite...) - Method in class okhttp3.ConnectionSpec.Builder
-
- cipherSuites(String...) - Method in class okhttp3.ConnectionSpec.Builder
-
- cipherSuites() - Method in class okhttp3.ConnectionSpec
-
Returns the cipher suites to use for a connection.
- CLEARTEXT - Static variable in class okhttp3.ConnectionSpec
-
Unencrypted, unauthenticated connections for http:
URLs.
- clone() - Method in interface okhttp3.Call
-
Create a new, identical call to this one which can be enqueued or executed even if this call
has already been.
- close() - Method in class okhttp3.Cache
-
- close() - Method in class okhttp3.Response
-
Closes the response body.
- close() - Method in class okhttp3.ResponseBody
-
- close(int, String) - Method in interface okhttp3.WebSocket
-
Attempts to initiate a graceful shutdown of this web socket.
- code(int) - Method in class okhttp3.Response.Builder
-
- code() - Method in class okhttp3.Response
-
Returns the HTTP status code.
- COMPATIBLE_TLS - Static variable in class okhttp3.ConnectionSpec
-
A backwards-compatible fallback configuration that works on obsolete client platforms and can
connect to obsolete servers.
- connectEnd(Call, InetSocketAddress, Proxy, Protocol) - Method in class okhttp3.EventListener
-
Invoked immediately after a socket connection was attempted.
- connectFailed(Call, InetSocketAddress, Proxy, Protocol, IOException) - Method in class okhttp3.EventListener
-
Invoked when a connection attempt fails.
- Connection - Interface in okhttp3
-
The sockets and streams of an HTTP, HTTPS, or HTTPS+HTTP/2 connection.
- connection() - Method in interface okhttp3.Interceptor.Chain
-
Returns the connection the request will be executed on.
- connectionAcquired(Call, Connection) - Method in class okhttp3.EventListener
-
Invoked after a connection has been acquired for the call
.
- connectionCount() - Method in class okhttp3.ConnectionPool
-
Returns total number of connections in the pool.
- ConnectionPool - Class in okhttp3
-
Manages reuse of HTTP and HTTP/2 connections for reduced network latency.
- ConnectionPool() - Constructor for class okhttp3.ConnectionPool
-
Create a new connection pool with tuning parameters appropriate for a single-user application.
- ConnectionPool(int, long, TimeUnit) - Constructor for class okhttp3.ConnectionPool
-
- connectionPool(ConnectionPool) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the connection pool used to recycle HTTP and HTTPS connections.
- connectionPool() - Method in class okhttp3.OkHttpClient
-
- connectionReleased(Call, Connection) - Method in class okhttp3.EventListener
-
Invoked after a connection has been released for the call
.
- ConnectionSpec - Class in okhttp3
-
Specifies configuration for the socket connection that HTTP traffic travels through.
- ConnectionSpec.Builder - Class in okhttp3
-
- connectionSpecs() - Method in class okhttp3.Address
-
- connectionSpecs(List<ConnectionSpec>) - Method in class okhttp3.OkHttpClient.Builder
-
- connectionSpecs() - Method in class okhttp3.OkHttpClient
-
- connectStart(Call, InetSocketAddress, Proxy) - Method in class okhttp3.EventListener
-
Invoked just prior to initiating a socket connection.
- connectTimeout(long, TimeUnit) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the default connect timeout for new connections.
- connectTimeout(Duration) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the default connect timeout for new connections.
- connectTimeoutMillis() - Method in interface okhttp3.Interceptor.Chain
-
- connectTimeoutMillis() - Method in class okhttp3.OkHttpClient
-
Default connect timeout (in milliseconds).
- contentLength() - Method in class okhttp3.FormBody
-
- contentLength() - Method in class okhttp3.MultipartBody
-
- contentLength() - Method in class okhttp3.RequestBody
-
- contentLength() - Method in class okhttp3.ResponseBody
-
- contentType() - Method in class okhttp3.FormBody
-
- contentType() - Method in class okhttp3.MultipartBody
-
- contentType() - Method in class okhttp3.RequestBody
-
Returns the Content-Type header for this body.
- contentType() - Method in class okhttp3.ResponseBody
-
- Cookie - Class in okhttp3
-
- Cookie.Builder - Class in okhttp3
-
Builds a cookie.
- CookieJar - Interface in okhttp3
-
Provides policy and persistence for HTTP cookies.
- cookieJar(CookieJar) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the handler that can accept cookies from incoming HTTP responses and provides cookies to
outgoing HTTP requests.
- cookieJar() - Method in class okhttp3.OkHttpClient
-
- create(Call) - Method in interface okhttp3.EventListener.Factory
-
- create(RequestBody) - Static method in class okhttp3.MultipartBody.Part
-
- create(Headers, RequestBody) - Static method in class okhttp3.MultipartBody.Part
-
- create(MediaType, String) - Static method in class okhttp3.RequestBody
-
Returns a new request body that transmits content
.
- create(MediaType, ByteString) - Static method in class okhttp3.RequestBody
-
Returns a new request body that transmits content
.
- create(MediaType, byte[]) - Static method in class okhttp3.RequestBody
-
Returns a new request body that transmits content
.
- create(MediaType, byte[], int, int) - Static method in class okhttp3.RequestBody
-
Returns a new request body that transmits content
.
- create(MediaType, File) - Static method in class okhttp3.RequestBody
-
Returns a new request body that transmits the content of file
.
- create(MediaType, String) - Static method in class okhttp3.ResponseBody
-
Returns a new response body that transmits content
.
- create(MediaType, byte[]) - Static method in class okhttp3.ResponseBody
-
Returns a new response body that transmits content
.
- create(MediaType, ByteString) - Static method in class okhttp3.ResponseBody
-
Returns a new response body that transmits content
.
- create(MediaType, long, BufferedSource) - Static method in class okhttp3.ResponseBody
-
Returns a new response body that transmits content
.
- createFormData(String, String) - Static method in class okhttp3.MultipartBody.Part
-
- createFormData(String, String, RequestBody) - Static method in class okhttp3.MultipartBody.Part
-
- Credentials - Class in okhttp3
-
Factory for HTTP authorization credentials.
- encodedFragment(String) - Method in class okhttp3.HttpUrl.Builder
-
- encodedFragment() - Method in class okhttp3.HttpUrl
-
Returns this URL's encoded fragment, like "abc"
for http://host/#abc
.
- encodedName(int) - Method in class okhttp3.FormBody
-
- encodedPassword(String) - Method in class okhttp3.HttpUrl.Builder
-
- encodedPassword() - Method in class okhttp3.HttpUrl
-
Returns the password, or an empty string if none is set.
- encodedPath(String) - Method in class okhttp3.HttpUrl.Builder
-
- encodedPath() - Method in class okhttp3.HttpUrl
-
Returns the entire path of this URL encoded for use in HTTP resource resolution.
- encodedPathSegments() - Method in class okhttp3.HttpUrl
-
Returns a list of encoded path segments like ["a", "b", "c"]
for the URL http://host/a/b/c
.
- encodedQuery(String) - Method in class okhttp3.HttpUrl.Builder
-
- encodedQuery() - Method in class okhttp3.HttpUrl
-
Returns the query of this URL, encoded for use in HTTP resource resolution.
- encodedUsername(String) - Method in class okhttp3.HttpUrl.Builder
-
- encodedUsername() - Method in class okhttp3.HttpUrl
-
Returns the username, or an empty string if none is set.
- encodedValue(int) - Method in class okhttp3.FormBody
-
- enqueue(Callback) - Method in interface okhttp3.Call
-
Schedules the request to be executed at some point in the future.
- equals(Object) - Method in class okhttp3.Address
-
- equals(Object) - Method in class okhttp3.CertificatePinner
-
- equals(Object) - Method in class okhttp3.Challenge
-
- equals(Object) - Method in class okhttp3.ConnectionSpec
-
- equals(Object) - Method in class okhttp3.Cookie
-
- equals(Object) - Method in class okhttp3.Handshake
-
- equals(Object) - Method in class okhttp3.Headers
-
Returns true if other
is a Headers
object with the same headers, with the same
casing, in the same order.
- equals(Object) - Method in class okhttp3.HttpUrl
-
- equals(Object) - Method in class okhttp3.MediaType
-
- equals(Object) - Method in class okhttp3.Route
-
- EventListener - Class in okhttp3
-
Listener for metrics events.
- EventListener() - Constructor for class okhttp3.EventListener
-
- eventListener(EventListener) - Method in class okhttp3.OkHttpClient.Builder
-
Configure a single client scoped listener that will receive all analytic events
for this client.
- EventListener.Factory - Interface in okhttp3
-
- eventListenerFactory(EventListener.Factory) - Method in class okhttp3.OkHttpClient.Builder
-
Configure a factory to provide per-call scoped listeners that will receive analytic events
for this client.
- eventListenerFactory() - Method in class okhttp3.OkHttpClient
-
- evictAll() - Method in class okhttp3.Cache
-
Deletes all values stored in the cache.
- evictAll() - Method in class okhttp3.ConnectionPool
-
Close and remove all idle connections in the pool.
- execute() - Method in interface okhttp3.Call
-
Invokes the request immediately, and blocks until the response can be processed or is in
error.
- executorService() - Method in class okhttp3.Dispatcher
-
- expiresAt(long) - Method in class okhttp3.Cookie.Builder
-
- expiresAt() - Method in class okhttp3.Cookie
-
- handshake() - Method in interface okhttp3.Connection
-
Returns the TLS handshake used to establish this connection, or null if the connection is not
HTTPS.
- Handshake - Class in okhttp3
-
A record of a TLS handshake.
- handshake(Handshake) - Method in class okhttp3.Response.Builder
-
- handshake() - Method in class okhttp3.Response
-
Returns the TLS handshake of the connection that carried this response, or null if the response
was received without TLS.
- hashCode() - Method in class okhttp3.Address
-
- hashCode() - Method in class okhttp3.CertificatePinner
-
- hashCode() - Method in class okhttp3.Challenge
-
- hashCode() - Method in class okhttp3.ConnectionSpec
-
- hashCode() - Method in class okhttp3.Cookie
-
- hashCode() - Method in class okhttp3.Handshake
-
- hashCode() - Method in class okhttp3.Headers
-
- hashCode() - Method in class okhttp3.HttpUrl
-
- hashCode() - Method in class okhttp3.MediaType
-
- hashCode() - Method in class okhttp3.Route
-
- head() - Method in class okhttp3.Request.Builder
-
- header(String, String) - Method in class okhttp3.Request.Builder
-
Sets the header named name
to value
.
- header(String) - Method in class okhttp3.Request
-
- header(String, String) - Method in class okhttp3.Response.Builder
-
Sets the header named name
to value
.
- header(String) - Method in class okhttp3.Response
-
- header(String, String) - Method in class okhttp3.Response
-
- Headers - Class in okhttp3
-
The header fields of a single HTTP message.
- headers() - Method in class okhttp3.MultipartBody.Part
-
- headers(Headers) - Method in class okhttp3.Request.Builder
-
Removes all headers on this builder and adds headers
.
- headers() - Method in class okhttp3.Request
-
- headers(String) - Method in class okhttp3.Request
-
- headers(Headers) - Method in class okhttp3.Response.Builder
-
Removes all headers on this builder and adds headers
.
- headers(String) - Method in class okhttp3.Response
-
- headers() - Method in class okhttp3.Response
-
- Headers.Builder - Class in okhttp3
-
- hitCount() - Method in class okhttp3.Cache
-
- host(String) - Method in class okhttp3.HttpUrl.Builder
-
- host() - Method in class okhttp3.HttpUrl
-
- hostnameVerifier() - Method in class okhttp3.Address
-
Returns the hostname verifier, or null if this is not an HTTPS address.
- hostnameVerifier(HostnameVerifier) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the verifier used to confirm that response certificates apply to requested hostnames for
HTTPS connections.
- hostnameVerifier() - Method in class okhttp3.OkHttpClient
-
- hostOnly() - Method in class okhttp3.Cookie
-
Returns true if this cookie's domain should be interpreted as a single host name, or false if
it should be interpreted as a pattern.
- hostOnlyDomain(String) - Method in class okhttp3.Cookie.Builder
-
Set the host-only domain for this cookie.
- httpOnly() - Method in class okhttp3.Cookie.Builder
-
- httpOnly() - Method in class okhttp3.Cookie
-
Returns true if this cookie should be limited to only HTTP APIs.
- HttpUrl - Class in okhttp3
-
A uniform resource locator (URL) with a scheme of either http
or https
.
- HttpUrl.Builder - Class in okhttp3
-
- name(String) - Method in class okhttp3.Cookie.Builder
-
- name() - Method in class okhttp3.Cookie
-
Returns a non-empty string with this cookie's name.
- name(int) - Method in class okhttp3.FormBody
-
- name(int) - Method in class okhttp3.Headers
-
Returns the field at position
.
- names() - Method in class okhttp3.Headers
-
Returns an immutable case-insensitive set of header names.
- networkCount() - Method in class okhttp3.Cache
-
- networkInterceptors() - Method in class okhttp3.OkHttpClient.Builder
-
Returns a modifiable list of interceptors that observe a single network request and response.
- networkInterceptors() - Method in class okhttp3.OkHttpClient
-
Returns an immutable list of interceptors that observe a single network request and response.
- networkResponse(Response) - Method in class okhttp3.Response.Builder
-
- networkResponse() - Method in class okhttp3.Response
-
Returns the raw response received from the network.
- newBuilder() - Method in class okhttp3.Headers
-
- newBuilder() - Method in class okhttp3.HttpUrl
-
- newBuilder(String) - Method in class okhttp3.HttpUrl
-
Returns a builder for the URL that would be retrieved by following link
from this URL,
or null if the resulting URL is not well-formed.
- newBuilder() - Method in class okhttp3.OkHttpClient
-
- newBuilder() - Method in class okhttp3.Request
-
- newBuilder() - Method in class okhttp3.Response
-
- newCall(Request) - Method in interface okhttp3.Call.Factory
-
- newCall(Request) - Method in class okhttp3.OkHttpClient
-
Prepares the request
to be executed at some point in the future.
- newWebSocket(Request, WebSocketListener) - Method in class okhttp3.OkHttpClient
-
Uses request
to connect a new web socket.
- newWebSocket(Request, WebSocketListener) - Method in interface okhttp3.WebSocket.Factory
-
Creates a new web socket and immediately returns it.
- NO_COOKIES - Static variable in interface okhttp3.CookieJar
-
A cookie jar that never accepts any cookies.
- noCache() - Method in class okhttp3.CacheControl.Builder
-
Don't accept an unvalidated cached response.
- noCache() - Method in class okhttp3.CacheControl
-
In a response, this field's name "no-cache" is misleading.
- NONE - Static variable in interface okhttp3.Authenticator
-
An authenticator that knows no credentials and makes no attempt to authenticate.
- NONE - Static variable in class okhttp3.EventListener
-
- noStore() - Method in class okhttp3.CacheControl.Builder
-
Don't store the server's response in any cache.
- noStore() - Method in class okhttp3.CacheControl
-
If true, this response should not be cached.
- noTransform() - Method in class okhttp3.CacheControl.Builder
-
Don't accept a transformed response.
- noTransform() - Method in class okhttp3.CacheControl
-
- PARALLEL - Static variable in class okhttp3.MultipartBody
-
This type is syntactically identical to "multipart/mixed", but the semantics are different.
- parse(Headers) - Static method in class okhttp3.CacheControl
-
Returns the cache directives of headers
.
- parse(HttpUrl, String) - Static method in class okhttp3.Cookie
-
Attempt to parse a Set-Cookie
HTTP header value setCookie
as a cookie.
- parse(String) - Static method in class okhttp3.HttpUrl
-
Returns a new HttpUrl
representing url
if it is a well-formed HTTP or HTTPS
URL, or null if it isn't.
- parse(String) - Static method in class okhttp3.MediaType
-
Returns a media type for string
, or null if string
is not a well-formed media
type.
- parseAll(HttpUrl, Headers) - Static method in class okhttp3.Cookie
-
Returns all of the cookies from a set of HTTP response headers.
- part(int) - Method in class okhttp3.MultipartBody
-
- parts() - Method in class okhttp3.MultipartBody
-
- password(String) - Method in class okhttp3.HttpUrl.Builder
-
- password() - Method in class okhttp3.HttpUrl
-
Returns the decoded password, or an empty string if none is present.
- patch(RequestBody) - Method in class okhttp3.Request.Builder
-
- path(String) - Method in class okhttp3.Cookie.Builder
-
- path() - Method in class okhttp3.Cookie
-
Returns this cookie's path.
- pathSegments() - Method in class okhttp3.HttpUrl
-
Returns a list of path segments like ["a", "b", "c"]
for the URL http://host/a/b/c
.
- pathSize() - Method in class okhttp3.HttpUrl
-
Returns the number of segments in this URL's path.
- peekBody(long) - Method in class okhttp3.Response
-
Peeks up to byteCount
bytes from the response body and returns them as a new response
body.
- peerCertificates() - Method in class okhttp3.Handshake
-
Returns a possibly-empty list of certificates that identify the remote peer.
- peerPrincipal() - Method in class okhttp3.Handshake
-
Returns the remote peer's principle, or null if that peer is anonymous.
- persistent() - Method in class okhttp3.Cookie
-
Returns true if this cookie does not expire at the end of the current session.
- pin(Certificate) - Static method in class okhttp3.CertificatePinner
-
Returns the SHA-256 of certificate
's public key.
- pingInterval(long, TimeUnit) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the interval between HTTP/2 and web socket pings initiated by this client.
- pingInterval(Duration) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the interval between HTTP/2 and web socket pings initiated by this client.
- pingIntervalMillis() - Method in class okhttp3.OkHttpClient
-
Web socket and HTTP/2 ping interval (in milliseconds).
- port(int) - Method in class okhttp3.HttpUrl.Builder
-
- port() - Method in class okhttp3.HttpUrl
-
Returns the explicitly-specified port if one was provided, or the default port for this URL's
scheme.
- post(RequestBody) - Method in class okhttp3.Request.Builder
-
- priorResponse(Response) - Method in class okhttp3.Response.Builder
-
- priorResponse() - Method in class okhttp3.Response
-
Returns the response for the HTTP redirect or authorization challenge that triggered this
response, or null if this response wasn't triggered by an automatic retry.
- proceed(Request) - Method in interface okhttp3.Interceptor.Chain
-
- protocol() - Method in interface okhttp3.Connection
-
Returns the protocol negotiated by this connection, or
Protocol.HTTP_1_1
if no protocol
has been negotiated.
- Protocol - Enum in okhttp3
-
Protocols that OkHttp implements for
ALPN selection.
- protocol(Protocol) - Method in class okhttp3.Response.Builder
-
- protocol() - Method in class okhttp3.Response
-
- protocols() - Method in class okhttp3.Address
-
Returns the protocols the client supports.
- protocols(List<Protocol>) - Method in class okhttp3.OkHttpClient.Builder
-
Configure the protocols used by this client to communicate with remote servers.
- protocols() - Method in class okhttp3.OkHttpClient
-
- proxy() - Method in class okhttp3.Address
-
Returns this address's explicitly-specified HTTP proxy, or null to delegate to the
proxy selector.
- proxy(Proxy) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the HTTP proxy that will be used by connections created by this client.
- proxy() - Method in class okhttp3.OkHttpClient
-
- proxy() - Method in class okhttp3.Route
-
Returns the
Proxy
of this route.
- proxyAuthenticator() - Method in class okhttp3.Address
-
Returns the client's proxy authenticator.
- proxyAuthenticator(Authenticator) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the authenticator used to respond to challenges from proxy servers.
- proxyAuthenticator() - Method in class okhttp3.OkHttpClient
-
- proxySelector() - Method in class okhttp3.Address
-
Returns this address's proxy selector.
- proxySelector(ProxySelector) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the proxy selection policy to be used if no
proxy
is specified
explicitly.
- proxySelector() - Method in class okhttp3.OkHttpClient
-
- put(RequestBody) - Method in class okhttp3.Request.Builder
-
- readTimeout(long, TimeUnit) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the default read timeout for new connections.
- readTimeout(Duration) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the default read timeout for new connections.
- readTimeoutMillis() - Method in interface okhttp3.Interceptor.Chain
-
- readTimeoutMillis() - Method in class okhttp3.OkHttpClient
-
Default read timeout (in milliseconds).
- realm() - Method in class okhttp3.Challenge
-
Returns the protection space.
- receivedResponseAtMillis(long) - Method in class okhttp3.Response.Builder
-
- receivedResponseAtMillis() - Method in class okhttp3.Response
-
Returns a
timestamp taken immediately after OkHttp
received this response's headers from the network.
- redact() - Method in class okhttp3.HttpUrl
-
Returns a string with containing this URL with its username, password, query, and fragment
stripped, and its path replaced with /...
.
- removeAll(String) - Method in class okhttp3.Headers.Builder
-
- removeAllEncodedQueryParameters(String) - Method in class okhttp3.HttpUrl.Builder
-
- removeAllQueryParameters(String) - Method in class okhttp3.HttpUrl.Builder
-
- removeHeader(String) - Method in class okhttp3.Request.Builder
-
Removes all headers named name
on this builder.
- removeHeader(String) - Method in class okhttp3.Response.Builder
-
Removes all headers named name
on this builder.
- removePathSegment(int) - Method in class okhttp3.HttpUrl.Builder
-
- request() - Method in interface okhttp3.Call
-
Returns the original request that initiated this call.
- request() - Method in interface okhttp3.Interceptor.Chain
-
- Request - Class in okhttp3
-
An HTTP request.
- request(Request) - Method in class okhttp3.Response.Builder
-
- request() - Method in class okhttp3.Response
-
The wire-level request that initiated this HTTP response.
- request() - Method in interface okhttp3.WebSocket
-
Returns the original request that initiated this web socket.
- Request.Builder - Class in okhttp3
-
- RequestBody - Class in okhttp3
-
- RequestBody() - Constructor for class okhttp3.RequestBody
-
- requestBodyEnd(Call, long) - Method in class okhttp3.EventListener
-
Invoked immediately after sending a request body.
- requestBodyStart(Call) - Method in class okhttp3.EventListener
-
Invoked just prior to sending a request body.
- requestCount() - Method in class okhttp3.Cache
-
- requestFailed(Call, IOException) - Method in class okhttp3.EventListener
-
Invoked when a request fails to be written.
- requestHeadersEnd(Call, Request) - Method in class okhttp3.EventListener
-
Invoked immediately after sending request headers.
- requestHeadersStart(Call) - Method in class okhttp3.EventListener
-
Invoked just prior to sending request headers.
- requiresTunnel() - Method in class okhttp3.Route
-
Returns true if this route tunnels HTTPS through an HTTP proxy.
- resolve(String) - Method in class okhttp3.HttpUrl
-
Returns the URL that would be retrieved by following link
from this URL, or null if
the resulting URL is not well-formed.
- Response - Class in okhttp3
-
An HTTP response.
- Response.Builder - Class in okhttp3
-
- ResponseBody - Class in okhttp3
-
A one-shot stream from the origin server to the client application with the raw bytes of the
response body.
- ResponseBody() - Constructor for class okhttp3.ResponseBody
-
- responseBodyEnd(Call, long) - Method in class okhttp3.EventListener
-
Invoked immediately after receiving a response body and completing reading it.
- responseBodyStart(Call) - Method in class okhttp3.EventListener
-
Invoked just prior to receiving the response body.
- responseFailed(Call, IOException) - Method in class okhttp3.EventListener
-
Invoked when a response fails to be read.
- responseHeadersEnd(Call, Response) - Method in class okhttp3.EventListener
-
Invoked immediately after receiving response headers.
- responseHeadersStart(Call) - Method in class okhttp3.EventListener
-
Invoked just prior to receiving response headers.
- RESTRICTED_TLS - Static variable in class okhttp3.ConnectionSpec
-
A secure TLS connection that requires a recent client platform and a recent server.
- retryOnConnectionFailure(boolean) - Method in class okhttp3.OkHttpClient.Builder
-
Configure this client to retry or not when a connectivity problem is encountered.
- retryOnConnectionFailure() - Method in class okhttp3.OkHttpClient
-
- route() - Method in interface okhttp3.Connection
-
Returns the route used by this connection.
- Route - Class in okhttp3
-
The concrete route used by a connection to reach an abstract origin server.
- Route(Address, Proxy, InetSocketAddress) - Constructor for class okhttp3.Route
-
- runningCalls() - Method in class okhttp3.Dispatcher
-
Returns a snapshot of the calls currently being executed.
- runningCallsCount() - Method in class okhttp3.Dispatcher
-
- saveFromResponse(HttpUrl, List<Cookie>) - Method in interface okhttp3.CookieJar
-
Saves cookies
from an HTTP response to this store according to this jar's policy.
- scheme() - Method in class okhttp3.Challenge
-
Returns the authentication scheme, like Basic
.
- scheme(String) - Method in class okhttp3.HttpUrl.Builder
-
- scheme() - Method in class okhttp3.HttpUrl
-
Returns either "http" or "https".
- secure() - Method in class okhttp3.Cookie.Builder
-
- secure() - Method in class okhttp3.Cookie
-
Returns true if this cookie should be limited to only HTTPS requests.
- secureConnectEnd(Call, Handshake) - Method in class okhttp3.EventListener
-
Invoked immediately after a TLS connection was attempted.
- secureConnectStart(Call) - Method in class okhttp3.EventListener
-
Invoked just prior to initiating a TLS connection.
- send(String) - Method in interface okhttp3.WebSocket
-
Attempts to enqueue text
to be UTF-8 encoded and sent as a the data of a text (type
0x1
) message.
- send(ByteString) - Method in interface okhttp3.WebSocket
-
Attempts to enqueue bytes
to be sent as a the data of a binary (type 0x2
)
message.
- sentRequestAtMillis(long) - Method in class okhttp3.Response.Builder
-
- sentRequestAtMillis() - Method in class okhttp3.Response
-
Returns a
timestamp taken immediately before OkHttp
transmitted the initiating request over the network.
- set(String, Date) - Method in class okhttp3.Headers.Builder
-
Set a field with the specified date.
- set(String, Instant) - Method in class okhttp3.Headers.Builder
-
Set a field with the specified instant.
- set(String, String) - Method in class okhttp3.Headers.Builder
-
Set a field with the specified value.
- setEncodedPathSegment(int, String) - Method in class okhttp3.HttpUrl.Builder
-
- setEncodedQueryParameter(String, String) - Method in class okhttp3.HttpUrl.Builder
-
- setIdleCallback(Runnable) - Method in class okhttp3.Dispatcher
-
Set a callback to be invoked each time the dispatcher becomes idle (when the number of running
calls returns to zero).
- setMaxRequests(int) - Method in class okhttp3.Dispatcher
-
Set the maximum number of requests to execute concurrently.
- setMaxRequestsPerHost(int) - Method in class okhttp3.Dispatcher
-
Set the maximum number of requests for each host to execute concurrently.
- setPathSegment(int, String) - Method in class okhttp3.HttpUrl.Builder
-
- setQueryParameter(String, String) - Method in class okhttp3.HttpUrl.Builder
-
- setType(MediaType) - Method in class okhttp3.MultipartBody.Builder
-
Set the MIME type.
- size() - Method in class okhttp3.Cache
-
- size() - Method in class okhttp3.FormBody
-
The number of key-value pairs in this form-encoded body.
- size() - Method in class okhttp3.Headers
-
Returns the number of field values.
- size() - Method in class okhttp3.MultipartBody
-
The number of parts in this multipart body.
- sMaxAgeSeconds() - Method in class okhttp3.CacheControl
-
The "s-maxage" directive is the max age for shared caches.
- socket() - Method in interface okhttp3.Connection
-
Returns the socket that this connection is using.
- socketAddress() - Method in class okhttp3.Route
-
- socketFactory() - Method in class okhttp3.Address
-
Returns the socket factory for new connections.
- socketFactory(SocketFactory) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the socket factory used to create connections.
- socketFactory() - Method in class okhttp3.OkHttpClient
-
- source() - Method in class okhttp3.ResponseBody
-
- sslSocketFactory() - Method in class okhttp3.Address
-
Returns the SSL socket factory, or null if this is not an HTTPS address.
- sslSocketFactory(SSLSocketFactory) - Method in class okhttp3.OkHttpClient.Builder
-
- sslSocketFactory(SSLSocketFactory, X509TrustManager) - Method in class okhttp3.OkHttpClient.Builder
-
Sets the socket factory and trust manager used to secure HTTPS connections.
- sslSocketFactory() - Method in class okhttp3.OkHttpClient
-
- string() - Method in class okhttp3.ResponseBody
-
Returns the response as a string.
- subtype() - Method in class okhttp3.MediaType
-
Returns a specific media subtype, such as "plain" or "png", "mpeg", "mp4" or "xml".
- supportsTlsExtensions(boolean) - Method in class okhttp3.ConnectionSpec.Builder
-
- supportsTlsExtensions() - Method in class okhttp3.ConnectionSpec
-
- SYSTEM - Static variable in interface okhttp3.Dns
-