public abstract class BaseInterceptor
extends java.lang.Object
| Constructor and Description |
|---|
BaseInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
Response |
intercept(Chain chain) |
protected abstract Response |
onAfterRequest(Response response,
Chain chain,
java.lang.String bodyString)
响应拦截
|
protected abstract Request |
onBeforeRequest(Request request,
Chain chain)
请求拦截
|
public Response intercept(Chain chain)
throws java.io.IOException
java.io.IOExceptionprotected abstract Request onBeforeRequest(Request request,
Chain chain)
request - chain - null : 不进行拦截处理protected abstract Response onAfterRequest(Response response,
Chain chain,
java.lang.String bodyString)
response - chain - bodyString - null : 不进行拦截处理