Package | Description |
---|---|
okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
okhttp3.internal.cache | |
okhttp3.internal.connection | |
okhttp3.internal.http | |
okhttp3.internal.http1 | |
okhttp3.internal.http2 | |
okhttp3.internal.huc | |
okhttp3.internal.ws | |
okhttp3.logging |
An OkHttp interceptor which logs HTTP request and response data.
|
Modifier and Type | Method and Description |
---|---|
Response |
Response.Builder.build() |
Response |
Response.cacheResponse()
Returns the raw response received from the cache.
|
Response |
Call.execute()
Invokes the request immediately, and blocks until the response can be processed or is in
error.
|
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) |
Modifier and Type | Method and Description |
---|---|
Request |
JavaNetAuthenticator.authenticate(Route route,
Response response) |
Request |
Authenticator.authenticate(Route route,
Response response)
Returns a request that includes a credential to satisfy an authentication challenge in
response . |
Response.Builder |
Response.Builder.cacheResponse(Response cacheResponse) |
Response.Builder |
Response.Builder.networkResponse(Response networkResponse) |
void |
WebSocketListener.onFailure(WebSocket webSocket,
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) |
void |
EventListener.responseHeadersEnd(Call call,
Response response)
Invoked immediately after receiving response headers.
|
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.
|
Modifier and Type | Method and Description |
---|---|
Response |
InternalCache.get(Request request) |
Response |
CacheInterceptor.intercept(Interceptor.Chain chain) |
Modifier and Type | Method and Description |
---|---|
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) |
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 |
---|
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 |
---|---|
Response |
BridgeInterceptor.intercept(Interceptor.Chain chain) |
Response |
CallServerInterceptor.intercept(Interceptor.Chain chain) |
Response |
RetryAndFollowUpInterceptor.intercept(Interceptor.Chain chain) |
Response |
RealInterceptorChain.proceed(Request request) |
Response |
RealInterceptorChain.proceed(Request request,
StreamAllocation streamAllocation,
HttpCodec httpCodec,
RealConnection connection) |
Modifier and Type | Method and Description |
---|---|
static long |
HttpHeaders.contentLength(Response response) |
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.
|
ResponseBody |
HttpCodec.openResponseBody(Response response)
Returns a stream that reads the response body.
|
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 |
---|---|
ResponseBody |
Http1Codec.openResponseBody(Response response) |
Modifier and Type | Method and Description |
---|---|
ResponseBody |
Http2Codec.openResponseBody(Response response) |
Modifier and Type | Method and Description |
---|---|
void |
OkHttpURLConnection.onResponse(Call call,
Response response) |
Modifier and Type | Method and Description |
---|---|
void |
RealWebSocket.failWebSocket(Exception e,
Response response) |
Modifier and Type | Method and Description |
---|---|
Response |
HttpLoggingInterceptor.intercept(Interceptor.Chain chain) |
Copyright © 2019. All rights reserved.