public enum GlobalInterceptor extends Enum<GlobalInterceptor>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
GlobalInterceptor |
addRequestInterceptor(HttpInterceptor<HttpRequest> interceptor)
设置拦截器,用于在请求前重新编辑请求
|
GlobalInterceptor |
addResponseInterceptor(HttpInterceptor<HttpResponse> interceptor)
设置拦截器,用于在响应读取后完成编辑或读取
|
GlobalInterceptor |
clear()
清空请求和响应拦截器
|
GlobalInterceptor |
clearRequest()
清空请求拦截器
|
GlobalInterceptor |
clearResponse()
清空响应拦截器
|
static GlobalInterceptor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GlobalInterceptor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GlobalInterceptor INSTANCE
public static GlobalInterceptor[] values()
for (GlobalInterceptor c : GlobalInterceptor.values()) System.out.println(c);
public static GlobalInterceptor valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic GlobalInterceptor addRequestInterceptor(HttpInterceptor<HttpRequest> interceptor)
interceptor
- 拦截器实现public GlobalInterceptor addResponseInterceptor(HttpInterceptor<HttpResponse> interceptor)
interceptor
- 拦截器实现public GlobalInterceptor clear()
public GlobalInterceptor clearRequest()
public GlobalInterceptor clearResponse()
Copyright © 2024. All rights reserved.