| Package | Description |
|---|---|
| org.aoju.bus.http | |
| org.aoju.bus.http.accord | |
| org.aoju.bus.http.cache | |
| org.aoju.bus.http.magic | |
| org.aoju.bus.http.metric.http |
| Modifier and Type | Method and Description |
|---|---|
List<Interceptor> |
Httpd.interceptors() |
List<Interceptor> |
Httpd.Builder.interceptors()
返回一个可修改的拦截器列表,该列表观察每个调用的完整跨度:
从建立连接之前(如果有的话)到选择响应源之后(源服务器、缓存或两者都有).
|
List<Interceptor> |
Httpd.networkInterceptors() |
List<Interceptor> |
Httpd.Builder.networkInterceptors()
返回观察单个网络请求和响应的可修改的拦截器列表。
这些拦截器必须调用
Interceptor.Chain#proceed
只执行一次:网络拦截器短路或重复网络请求是错误的 |
| Modifier and Type | Method and Description |
|---|---|
Httpd.Builder |
Httpd.Builder.addInterceptor(Interceptor interceptor) |
Httpd.Builder |
Httpd.Builder.addNetworkInterceptor(Interceptor interceptor) |
| Modifier and Type | Class and Description |
|---|---|
class |
ConnectInterceptor
打开到目标服务器的连接并继续到下一个拦截器.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CacheInterceptor
服务来自缓存的请求并将响应写入缓存。
|
| Modifier and Type | Class and Description |
|---|---|
class |
FileInterceptor
请求参数-文件处理
|
| Modifier and Type | Method and Description |
|---|---|
HttpBuilder |
HttpBuilder.addInterceptor(Interceptor interceptor) |
HttpBuilder |
HttpBuilder.addNetworkInterceptor(Interceptor interceptor) |
| Modifier and Type | Class and Description |
|---|---|
class |
BridgeInterceptor
从应用程序代码连接到网络代码。首先,它从用户请求构建网络请求。
然后它继续调用网络。最后,它从网络响应构建用户响应
|
class |
CallServerInterceptor
这是链中的最后一个拦截器
它对服务器进行网络调用
|
class |
RetryAndFollowUp
该拦截器从失败中恢复,并根据需要进行重定向
如果调用被取消,它可能会抛出
IOException |
| Constructor and Description |
|---|
HttpsURLConnection(URL url,
Httpd client,
Interceptor filter) |
HttpURLConnection(URL url,
Httpd client,
Interceptor urlFilter) |
| Constructor and Description |
|---|
RealInterceptorChain(List<Interceptor> interceptors,
StreamAllocation streamAllocation,
HttpCodec httpCodec,
RealConnection connection,
int index,
Request request,
NewCall call,
EventListener eventListener,
int connectTimeout,
int readTimeout,
int writeTimeout) |
Copyright © 2020. All rights reserved.