public interface Interceptor
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
beforeParse(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpResponse httpResponse,
HttpParser httpParser)
在请求之后,解析之前执行
|
<T> T |
beforeRequest(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpExecutor executor)
在请求之前执行
|
<T> T beforeRequest(Method method, Request request, BodyType bodyType, ResponseType responseType, HttpExecutor executor) throws HttpClientException
T - 返回值method - 被调用方法request - 请求数据bodyType - 请求类型responseType - 响应类型executor - 请求执行器null则发出请求,否则直接返回HttpClientException<T> T beforeParse(Method method, Request request, BodyType bodyType, ResponseType responseType, HttpResponse httpResponse, HttpParser httpParser) throws HttpClientException, IOException
T - 返回null则调用解析器解析,否则直接返回method - 被调用方法request - 请求数据bodyType - 请求类型responseType - 响应类型httpResponse - 响应内容httpParser - 响应内容解析器HttpClientExceptionIOExceptionCopyright © 2019. All rights reserved.