# new RequestInterceptor(options)
请求拦截器对象
参数:
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
options |
Object | 构造参数 |
|
before(config) |
function | 无 | 请求发送前会执行的函数 |
failure(error) |
function | 无 | 请求发送失败会执行的函数 |
请求拦截器对象
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
options |
Object | 构造参数 |
|
before(config) |
function | 无 | 请求发送前会执行的函数 |
failure(error) |
function | 无 | 请求发送失败会执行的函数 |