From 04cb846a08c86e5a070a12b0605cb4a5d5120f66 Mon Sep 17 00:00:00 2001 From: chouchouji <70570907+chouchouji@users.noreply.github.com> Date: Mon, 18 Dec 2023 22:36:20 +0800 Subject: [PATCH] docs: update readme (#12) --- README.md | 6 +++--- README.zh-CN.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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'] }), ) ```