Skip to content

Commit

Permalink
docs: update readme (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji authored Dec 18, 2023
1 parent 5f6efe3 commit 04cb846
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}),
)
```
Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}),
)
```
Expand Down

0 comments on commit 04cb846

Please sign in to comment.