public class BasicAuthInterceptor extends InterceptorAdaptor
| 构造器和说明 |
|---|
BasicAuthInterceptor(String username,
String password) |
BasicAuthInterceptor(String username,
String password,
Charset charset) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
beforeRequest(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpExecutor executor)
在请求之前执行
|
beforeParsepublic <T> T beforeRequest(Method method, Request request, BodyType bodyType, ResponseType responseType, HttpExecutor executor) throws HttpClientException
InterceptorbeforeRequest 在接口中 InterceptorbeforeRequest 在类中 InterceptorAdaptorT - 返回值method - 被调用方法request - 请求数据bodyType - 请求类型responseType - 响应类型executor - 请求执行器null则发出请求,否则直接返回HttpClientExceptionCopyright © 2019. All rights reserved.