Package | Description |
---|---|
okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
okhttp3.apache | |
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 | 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 |
Call.execute()
Invokes the request immediately, and blocks until the response can be processed or is in
error.
|
Response |
RealCall.execute() |
(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 |
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) |
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 static org.apache.http.HttpResponse |
OkApacheClient.transformResponse(Response response)
Deprecated.
|
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 |
---|---|
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) |
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.
|
ResponseBody |
HttpCodec.openResponseBody(Response response)
Returns a stream that reads the response body.
|
private int |
RetryAndFollowUpInterceptor.retryAfter(Response userResponse,
int defaultDelay) |
private boolean |
RetryAndFollowUpInterceptor.sameConnection(Response response,
HttpUrl followUp)
Returns true if an HTTP request for
followUp can reuse the connection used by this
engine. |
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 |
---|---|
ResponseBody |
Http1Codec.openResponseBody(Response response) |
Modifier and Type | Method and Description |
---|---|
ResponseBody |
Http2Codec.openResponseBody(Response response) |
Modifier and Type | Field and Description |
---|---|
(package private) Response |
OkHttpURLConnection.networkResponse |
private Response |
OkHttpURLConnection.response |
Modifier and Type | Method and Description |
---|---|
private Response |
OkHttpURLConnection.getResponse(boolean networkResponseOnError)
Aggressively tries to get the final HTTP response, potentially making many HTTP requests in the
process in order to cope with redirects and authentication.
|
Response |
OkHttpURLConnection.NetworkInterceptor.intercept(Interceptor.Chain chain) |
Modifier and Type | Method and Description |
---|---|
void |
OkHttpURLConnection.onResponse(Call call,
Response response) |
private static java.lang.String |
OkHttpURLConnection.responseSourceHeader(Response response) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
RealWebSocket.checkResponse(Response response) |
void |
RealWebSocket.failWebSocket(java.lang.Exception e,
Response response) |
Modifier and Type | Method and Description |
---|---|
Response |
HttpLoggingInterceptor.intercept(Interceptor.Chain chain) |