Package | Description |
---|---|
com.squareup.okhttp | |
com.squareup.okhttp.internal | |
com.squareup.okhttp.internal.http | |
com.squareup.okhttp.logging | |
com.squareup.okhttp.recipes | |
com.squareup.okhttp.ws |
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 |
Authenticator.authenticate(Proxy proxy,
Response response)
Returns a request that includes a credential to satisfy an authentication
challenge in
response . |
Request |
Authenticator.authenticateProxy(Proxy proxy,
Response response)
Returns a request that includes a credential to satisfy an authentication
challenge made by
response . |
Response.Builder |
Response.Builder.cacheResponse(Response cacheResponse) |
Response.Builder |
Response.Builder.networkResponse(Response networkResponse) |
void |
Callback.onResponse(Response response)
Called when the HTTP response was successfully returned by the remote
server.
|
Response.Builder |
Response.Builder.priorResponse(Response priorResponse) |
Modifier and Type | Method and Description |
---|---|
Response |
InternalCache.get(Request request) |
Modifier and Type | Method and Description |
---|---|
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 . |
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 |
HttpEngine.getResponse()
Returns the engine's response.
|
Modifier and Type | Method and Description |
---|---|
Request |
AuthenticatorAdapter.authenticate(Proxy proxy,
Response response) |
Request |
AuthenticatorAdapter.authenticateProxy(Proxy proxy,
Response response) |
static long |
OkHeaders.contentLength(Response response) |
static StatusLine |
StatusLine.get(Response response) |
static boolean |
HttpEngine.hasBody(Response response)
Returns true if the response must have a (possibly 0-length) body.
|
static boolean |
OkHeaders.hasVaryAll(Response response)
Returns true if a Vary header contains an asterisk.
|
static boolean |
CacheStrategy.isCacheable(Response response,
Request request)
Returns true if
response can be stored to later serve another
request. |
ResponseBody |
HttpStream.openResponseBody(Response response)
Returns a stream that reads the response body.
|
ResponseBody |
Http2xStream.openResponseBody(Response response) |
ResponseBody |
Http1xStream.openResponseBody(Response response) |
static Request |
OkHeaders.processAuthHeader(Authenticator authenticator,
Response response,
Proxy proxy)
React to a failed authorization response by looking up new credentials.
|
static Headers |
OkHeaders.varyHeaders(Response response)
Returns the subset of the headers in
response 's request that
impact the content of response's body. |
static boolean |
OkHeaders.varyMatches(Response cachedResponse,
Headers cachedRequest,
Request newRequest)
Returns true if none of the Vary headers have changed between
cachedRequest and newRequest . |
Constructor and Description |
---|
Factory(long nowMillis,
Request request,
Response cacheResponse) |
HttpEngine(OkHttpClient client,
Request request,
boolean bufferRequestBody,
boolean callerWritesRequestBody,
boolean forWebSocket,
StreamAllocation streamAllocation,
RetryableSink requestBodyOut,
Response priorResponse) |
Modifier and Type | Method and Description |
---|---|
Response |
HttpLoggingInterceptor.intercept(Interceptor.Chain chain) |
Modifier and Type | Method and Description |
---|---|
void |
WebSocketEcho.onFailure(IOException e,
Response response) |
void |
WebSocketEcho.onOpen(WebSocket webSocket,
Response response) |
Modifier and Type | Method and Description |
---|---|
void |
WebSocketListener.onFailure(IOException e,
Response response)
Called when the transport or protocol layer of this web socket errors during communication.
|
void |
WebSocketListener.onOpen(WebSocket webSocket,
Response response)
Called when the request has successfully been upgraded to a web socket.
|
Copyright © 2016. All rights reserved.