Package | Description |
---|---|
okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
okhttp3.dnsoverhttps |
A DNS over HTTPS implementation for OkHttp.
|
okhttp3.internal | |
okhttp3.internal.cache | |
okhttp3.internal.connection | |
okhttp3.internal.http | |
okhttp3.internal.http1 | |
okhttp3.internal.http2 | |
okhttp3.internal.sse |
Private support classes for server-sent events.
|
okhttp3.internal.ws | |
okhttp3.logging |
An OkHttp interceptor which logs HTTP request and response data.
|
okhttp3.sse |
Support for server-sent events.
|
Modifier and Type | Field and Description |
---|---|
(package private) Response |
Response.cacheResponse |
(package private) Response |
Response.Builder.cacheResponse |
(package private) Response |
Response.networkResponse |
(package private) Response |
Response.Builder.networkResponse |
(package private) Response |
Response.priorResponse |
(package private) Response |
Response.Builder.priorResponse |
Modifier and Type | Method and Description |
---|---|
Response |
Response.Builder.build() |
Response |
Response.cacheResponse()
Returns the raw response received from the cache.
|
Response |
RealCall.execute() |
Response |
Call.execute()
Invokes the request immediately, and blocks until the response can be processed or is in
error.
|
(package private) Response |
Cache.get(Request request) |
(package private) Response |
RealCall.getResponseWithInterceptorChain() |
Response |
Interceptor.intercept(Interceptor.Chain chain) |
Response |
Response.networkResponse()
Returns the raw response received from the network.
|
Response |
Response.priorResponse()
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.
|
Response |
Interceptor.Chain.proceed(Request request) |
Response |
Cache.Entry.response(DiskLruCache.Snapshot snapshot) |
Modifier and Type | Method and Description |
---|---|
Request |
Authenticator.authenticate(Route route,
Response response)
Returns a request that includes a credential to satisfy an authentication challenge in
response . |
Request |
JavaNetAuthenticator.authenticate(Route route,
Response response) |
Response.Builder |
Response.Builder.cacheResponse(Response cacheResponse) |
private void |
Response.Builder.checkPriorResponse(Response response) |
private void |
Response.Builder.checkSupportResponse(java.lang.String name,
Response response) |
boolean |
Cache.Entry.matches(Request request,
Response response) |
Response.Builder |
Response.Builder.networkResponse(Response networkResponse) |
void |
WebSocketListener.onFailure(WebSocket webSocket,
java.lang.Throwable t,
Response response)
Invoked when a web socket has been closed due to an error reading from or writing to the
network.
|
void |
WebSocketListener.onOpen(WebSocket webSocket,
Response response)
Invoked when a web socket has been accepted by the remote peer and may begin transmitting
messages.
|
void |
Callback.onResponse(Call call,
Response response)
Called when the HTTP response was successfully returned by the remote server.
|
Response.Builder |
Response.Builder.priorResponse(Response priorResponse) |
(package private) CacheRequest |
Cache.put(Response response) |
void |
EventListener.responseHeadersEnd(Call call,
Response response)
Invoked immediately after receiving response headers.
|
(package private) void |
Cache.update(Response cached,
Response network) |
Constructor and Description |
---|
Builder(Response response) |
Entry(Response response) |
Modifier and Type | Method and Description |
---|---|
private Response |
DnsOverHttps.getCacheOnlyResponse(Request request) |
Modifier and Type | Method and Description |
---|---|
private void |
DnsOverHttps.processResponse(Response response,
java.lang.String hostname,
java.util.List<java.net.InetAddress> results,
java.util.List<java.lang.Exception> failures) |
private java.util.List<java.net.InetAddress> |
DnsOverHttps.readResponse(java.lang.String hostname,
Response response) |
Modifier and Type | Method and Description |
---|---|
abstract Exchange |
Internal.exchange(Response response) |
Modifier and Type | Field and Description |
---|---|
Response |
CacheStrategy.cacheResponse
The cached response to return or validate; or null if this call doesn't use a cache.
|
(package private) Response |
CacheStrategy.Factory.cacheResponse |
Modifier and Type | Method and Description |
---|---|
private Response |
CacheInterceptor.cacheWritingResponse(CacheRequest cacheRequest,
Response response)
Returns a new source that writes bytes to
cacheRequest as they are read by the source
consumer. |
Response |
InternalCache.get(Request request) |
Response |
CacheInterceptor.intercept(Interceptor.Chain chain) |
private static Response |
CacheInterceptor.stripBody(Response response) |
Modifier and Type | Method and Description |
---|---|
private Response |
CacheInterceptor.cacheWritingResponse(CacheRequest cacheRequest,
Response response)
Returns a new source that writes bytes to
cacheRequest as they are read by the source
consumer. |
static boolean |
CacheStrategy.isCacheable(Response response,
Request request)
Returns true if
response can be stored to later serve another request. |
CacheRequest |
InternalCache.put(Response response) |
private static Response |
CacheInterceptor.stripBody(Response response) |
void |
InternalCache.update(Response cached,
Response network)
Handles a conditional request hit by updating the stored cache response with the headers from
network . |
Constructor and Description |
---|
CacheStrategy(Request networkRequest,
Response cacheResponse) |
Factory(long nowMillis,
Request request,
Response cacheResponse) |
Modifier and Type | Method and Description |
---|---|
Response |
ConnectInterceptor.intercept(Interceptor.Chain chain) |
Modifier and Type | Method and Description |
---|---|
ResponseBody |
Exchange.openResponseBody(Response response) |
void |
Exchange.responseHeadersEnd(Response response) |
Modifier and Type | Method and Description |
---|---|
Response |
RetryAndFollowUpInterceptor.intercept(Interceptor.Chain chain) |
Response |
CallServerInterceptor.intercept(Interceptor.Chain chain) |
Response |
BridgeInterceptor.intercept(Interceptor.Chain chain) |
Response |
RealInterceptorChain.proceed(Request request) |
Response |
RealInterceptorChain.proceed(Request request,
Transmitter transmitter,
Exchange exchange) |
Modifier and Type | Method and Description |
---|---|
static long |
HttpHeaders.contentLength(Response response) |
private Request |
RetryAndFollowUpInterceptor.followUpRequest(Response userResponse,
Route route)
Figures out the HTTP request to make in response to receiving
userResponse . |
static StatusLine |
StatusLine.get(Response response) |
static boolean |
HttpHeaders.hasBody(Response response)
Returns true if the response must have a (possibly 0-length) body.
|
static boolean |
HttpHeaders.hasVaryAll(Response response)
Returns true if a Vary header contains an asterisk.
|
okio.Source |
ExchangeCodec.openResponseBodySource(Response response) |
long |
ExchangeCodec.reportedContentLength(Response response) |
private int |
RetryAndFollowUpInterceptor.retryAfter(Response userResponse,
int defaultDelay) |
private static java.util.Set<java.lang.String> |
HttpHeaders.varyFields(Response response) |
static Headers |
HttpHeaders.varyHeaders(Response response)
Returns the subset of the headers in
response 's request that impact the content of
response's body. |
static boolean |
HttpHeaders.varyMatches(Response cachedResponse,
Headers cachedRequest,
Request newRequest)
Returns true if none of the Vary headers have changed between
cachedRequest and newRequest . |
Modifier and Type | Method and Description |
---|---|
okio.Source |
Http1ExchangeCodec.openResponseBodySource(Response response) |
long |
Http1ExchangeCodec.reportedContentLength(Response response) |
void |
Http1ExchangeCodec.skipConnectBody(Response response)
The response body from a CONNECT should be empty, but if it is not then we should consume it
before proceeding.
|
Modifier and Type | Method and Description |
---|---|
okio.Source |
Http2ExchangeCodec.openResponseBodySource(Response response) |
long |
Http2ExchangeCodec.reportedContentLength(Response response) |
Modifier and Type | Method and Description |
---|---|
void |
RealEventSource.onResponse(Call call,
Response response) |
void |
RealEventSource.processResponse(Response response) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
RealWebSocket.checkUpgradeSuccess(Response response,
Exchange exchange) |
void |
RealWebSocket.failWebSocket(java.lang.Exception e,
Response response) |
Modifier and Type | Method and Description |
---|---|
Response |
HttpLoggingInterceptor.intercept(Interceptor.Chain chain) |
Modifier and Type | Method and Description |
---|---|
void |
LoggingEventListener.responseHeadersEnd(Call call,
Response response) |
Modifier and Type | Method and Description |
---|---|
void |
EventSourceListener.onFailure(EventSource eventSource,
java.lang.Throwable t,
Response response)
Invoked when an event source has been closed due to an error reading from or writing to the
network.
|
void |
EventSourceListener.onOpen(EventSource eventSource,
Response response)
Invoked when an event source has been accepted by the remote peer and may begin transmitting
events.
|
static void |
EventSources.processResponse(Response response,
EventSourceListener listener) |