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) Request |
RealCall.originalRequest
The application's original request unadulterated by redirects or auth headers.
|
(package private) Request |
Response.request |
(package private) Request |
Response.Builder.request |
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) |
Request |
Request.Builder.build() |
Request |
Call.request()
Returns the original request that initiated this call.
|
Request |
RealCall.request() |
(package private) Request |
RealCall.AsyncCall.request() |
Request |
WebSocket.request()
Returns the original request that initiated this web socket.
|
Request |
Response.request()
The wire-level request that initiated this HTTP response.
|
Request |
Interceptor.Chain.request() |
Modifier and Type | Method and Description |
---|---|
(package private) Response |
Cache.get(Request request) |
boolean |
Cache.Entry.matches(Request request,
Response response) |
Call |
OkHttpClient.newCall(Request request)
Prepares the
request to be executed at some point in the future. |
Call |
Call.Factory.newCall(Request request) |
(package private) static RealCall |
RealCall.newRealCall(OkHttpClient client,
Request originalRequest,
boolean forWebSocket) |
WebSocket |
OkHttpClient.newWebSocket(Request request,
WebSocketListener listener)
Uses
request to connect a new web socket. |
WebSocket |
WebSocket.Factory.newWebSocket(Request request,
WebSocketListener listener)
Creates a new web socket and immediately returns it.
|
Response |
Interceptor.Chain.proceed(Request request) |
(package private) void |
Cache.remove(Request request) |
Response.Builder |
Response.Builder.request(Request request) |
void |
EventListener.requestHeadersEnd(Call call,
Request request)
Invoked immediately after sending request headers.
|
Constructor and Description |
---|
Builder(Request request) |
RealCall(OkHttpClient client,
Request originalRequest,
boolean forWebSocket) |
Modifier and Type | Method and Description |
---|---|
private Request |
DnsOverHttps.buildRequest(java.lang.String hostname,
int type) |
Modifier and Type | Method and Description |
---|---|
private Response |
DnsOverHttps.getCacheOnlyResponse(Request request) |
Modifier and Type | Method and Description |
---|---|
abstract Call |
Internal.newWebSocketCall(OkHttpClient client,
Request request) |
Modifier and Type | Field and Description |
---|---|
Request |
CacheStrategy.networkRequest
The request to send on the network, or null if this call doesn't use the network.
|
(package private) Request |
CacheStrategy.Factory.request |
Modifier and Type | Method and Description |
---|---|
Response |
InternalCache.get(Request request) |
private static boolean |
CacheStrategy.Factory.hasConditions(Request request)
Returns true if the request contains conditions that save the server from sending a response
that the client has locally.
|
static boolean |
CacheStrategy.isCacheable(Response response,
Request request)
Returns true if
response can be stored to later serve another request. |
void |
InternalCache.remove(Request request)
Remove any cache entries for the supplied
request . |
Constructor and Description |
---|
CacheStrategy(Request networkRequest,
Response cacheResponse) |
Factory(long nowMillis,
Request request,
Response cacheResponse) |
Modifier and Type | Field and Description |
---|---|
private Request |
Transmitter.request |
Modifier and Type | Method and Description |
---|---|
private Request |
RealConnection.createTunnel(int readTimeout,
int writeTimeout,
Request tunnelRequest,
HttpUrl url)
To make an HTTPS connection over an HTTP proxy, send an unencrypted CONNECT request to create
the proxy connection.
|
private Request |
RealConnection.createTunnelRequest()
Returns a request that creates a TLS tunnel via an HTTP proxy.
|
Modifier and Type | Method and Description |
---|---|
okio.Sink |
Exchange.createRequestBody(Request request,
boolean duplex) |
private Request |
RealConnection.createTunnel(int readTimeout,
int writeTimeout,
Request tunnelRequest,
HttpUrl url)
To make an HTTPS connection over an HTTP proxy, send an unencrypted CONNECT request to create
the proxy connection.
|
void |
Transmitter.prepareToConnect(Request request)
Prepare to create a stream to carry
request . |
void |
Exchange.writeRequestHeaders(Request request) |
Modifier and Type | Field and Description |
---|---|
private Request |
RealInterceptorChain.request |
Modifier and Type | Method and Description |
---|---|
private Request |
RetryAndFollowUpInterceptor.followUpRequest(Response userResponse,
Route route)
Figures out the HTTP request to make in response to receiving
userResponse . |
Request |
RealInterceptorChain.request() |
Modifier and Type | Method and Description |
---|---|
okio.Sink |
ExchangeCodec.createRequestBody(Request request,
long contentLength)
Returns an output stream where the request body can be streamed.
|
static java.lang.String |
RequestLine.get(Request request,
java.net.Proxy.Type proxyType)
Returns the request status line, like "GET / HTTP/1.1".
|
private static boolean |
RequestLine.includeAuthorityInRequestLine(Request request,
java.net.Proxy.Type proxyType)
Returns true if the request line should contain the full URL with host and port (like "GET
http://android.com/foo HTTP/1.1") or only the path (like "GET /foo HTTP/1.1").
|
Response |
RealInterceptorChain.proceed(Request request) |
Response |
RealInterceptorChain.proceed(Request request,
Transmitter transmitter,
Exchange exchange) |
private boolean |
RetryAndFollowUpInterceptor.recover(java.io.IOException e,
Transmitter transmitter,
boolean requestSendStarted,
Request userRequest)
Report and attempt to recover from a failure to communicate with a server.
|
private boolean |
RetryAndFollowUpInterceptor.requestIsOneShot(java.io.IOException e,
Request userRequest) |
static boolean |
HttpHeaders.varyMatches(Response cachedResponse,
Headers cachedRequest,
Request newRequest)
Returns true if none of the Vary headers have changed between
cachedRequest and newRequest . |
void |
ExchangeCodec.writeRequestHeaders(Request request)
This should update the HTTP engine's sentRequestMillis field.
|
Constructor and Description |
---|
RealInterceptorChain(java.util.List<Interceptor> interceptors,
Transmitter transmitter,
Exchange exchange,
int index,
Request request,
Call call,
int connectTimeout,
int readTimeout,
int writeTimeout) |
Modifier and Type | Method and Description |
---|---|
okio.Sink |
Http1ExchangeCodec.createRequestBody(Request request,
long contentLength) |
void |
Http1ExchangeCodec.writeRequestHeaders(Request request)
Prepares the HTTP headers and sends them to the server.
|
Modifier and Type | Method and Description |
---|---|
okio.Sink |
Http2ExchangeCodec.createRequestBody(Request request,
long contentLength) |
static java.util.List<Header> |
Http2ExchangeCodec.http2HeadersList(Request request) |
void |
Http2ExchangeCodec.writeRequestHeaders(Request request) |
Modifier and Type | Field and Description |
---|---|
private Request |
RealEventSource.request |
Modifier and Type | Method and Description |
---|---|
Request |
RealEventSource.request() |
Constructor and Description |
---|
RealEventSource(Request request,
EventSourceListener listener) |
Modifier and Type | Field and Description |
---|---|
private Request |
RealWebSocket.originalRequest
The application's original request unadulterated by web socket headers.
|
Modifier and Type | Method and Description |
---|---|
Request |
RealWebSocket.request() |
Constructor and Description |
---|
RealWebSocket(Request request,
WebSocketListener listener,
java.util.Random random,
long pingIntervalMillis) |
Modifier and Type | Method and Description |
---|---|
void |
LoggingEventListener.requestHeadersEnd(Call call,
Request request) |
Modifier and Type | Method and Description |
---|---|
Request |
EventSource.request()
Returns the original request that initiated this event source.
|
Modifier and Type | Method and Description |
---|---|
EventSource |
EventSource.Factory.newEventSource(Request request,
EventSourceListener listener)
Creates a new event source and immediately returns it.
|