diff --git a/README.md b/README.md index 6096d3e..73749fa 100644 --- a/README.md +++ b/README.md @@ -250,14 +250,14 @@ Each built-in interceptor supports `include` `exclude` `axiosInterceptorOptions #### include & exclude -It is used to request filtering to determine what request should apply the interceptor and support specifying the `method` or `glob` syntax. The usage method is as follows. +It is used to request filtering to determine what request should apply the interceptor and support specifying the `method`、 `glob` syntax or `status` code. The usage method is as follows. ```ts axle.useResponseInterceptor( responseRetryInterceptor({ count: 3, - include: ['method:put', 'method:post'], - exclude: ['/system/**', '/user/addUser'] + include: ['method:put', 'method:post', 'status:500'], + exclude: ['/system/**', '/user/addUser', 'status:400'] }), ) ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index a00a786..90f5eba 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -250,14 +250,14 @@ axle.useResponseInterceptor(responseRetryInterceptor({ count: 3 })) #### include & exclude -用于请求过滤,以确定什么请求应该应用该拦截器,支持指定 method 或是 glob 语法,使用方式如下。 +用于请求过滤,以确定什么请求应该应用该拦截器,支持指定 `method`、 `glob` 或者 `status`,使用方式如下。 ```ts axle.useResponseInterceptor( responseRetryInterceptor({ count: 3, - include: ['method:put', 'method:post'], - exclude: ['/system/**', '/user/addUser'] + include: ['method:put', 'method:post', 'status:500'], + exclude: ['/system/**', '/user/addUser', 'status:400'] }), ) ```