Package | Description |
---|---|
okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
okhttp3.internal.cache | |
okhttp3.internal.connection | |
okhttp3.internal.http | |
okhttp3.logging |
An OkHttp interceptor which logs HTTP request and response data.
|
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<Interceptor> |
OkHttpClient.interceptors |
(package private) java.util.List<Interceptor> |
OkHttpClient.Builder.interceptors |
(package private) java.util.List<Interceptor> |
OkHttpClient.networkInterceptors |
(package private) java.util.List<Interceptor> |
OkHttpClient.Builder.networkInterceptors |
Modifier and Type | Method and Description |
---|---|
java.util.List<Interceptor> |
OkHttpClient.interceptors()
Returns an immutable list of interceptors that observe the full span of each call: from before
the connection is established (if any) until after the response source is selected (either the
origin server, cache, or both).
|
java.util.List<Interceptor> |
OkHttpClient.Builder.interceptors()
Returns a modifiable list of interceptors that observe the full span of each call: from
before the connection is established (if any) until after the response source is selected
(either the origin server, cache, or both).
|
java.util.List<Interceptor> |
OkHttpClient.networkInterceptors()
Returns an immutable list of interceptors that observe a single network request and response.
|
java.util.List<Interceptor> |
OkHttpClient.Builder.networkInterceptors()
Returns a modifiable list of interceptors that observe a single network request and response.
|
Modifier and Type | Method and Description |
---|---|
OkHttpClient.Builder |
OkHttpClient.Builder.addInterceptor(Interceptor interceptor) |
OkHttpClient.Builder |
OkHttpClient.Builder.addNetworkInterceptor(Interceptor interceptor) |
Modifier and Type | Class and Description |
---|---|
class |
CacheInterceptor
Serves requests from the cache and writes responses to the cache.
|
Modifier and Type | Class and Description |
---|---|
class |
ConnectInterceptor
Opens a connection to the target server and proceeds to the next interceptor.
|
Modifier and Type | Class and Description |
---|---|
class |
BridgeInterceptor
Bridges from application code to network code.
|
class |
CallServerInterceptor
This is the last interceptor in the chain.
|
class |
RetryAndFollowUpInterceptor
This interceptor recovers from failures and follows redirects as necessary.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<Interceptor> |
RealInterceptorChain.interceptors |
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 | Class and Description |
---|---|
class |
HttpLoggingInterceptor
An OkHttp interceptor which logs request and response information.
|