Skip to content

Commit 160f25e

Browse files
Merge remote-tracking branch 'origin/dev' into Linter_and_Prettier
2 parents 9c5d36d + 264868d commit 160f25e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/OtherAPIs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ try {
9494
}
9595
```
9696

97-
## MIDDLEWAREOPTION
97+
## MIDDLEWAREOPTIONS
9898

99-
You can pass in the middleware options for a request through `.middlewareOption()`. This takes array of strongly typed middleware options, these middleware options should be an implementation of MiddlewareOption interface
99+
You can override the client middleware behavior by setting per request middleware options. Use the `.middlewareOptions()` request builder method to add custom middleware behavior for a specific request. The `middlewareOptions()` method takes an array of strongly typed middleware options. These middleware options are an implementation of the [MiddlewareOption](../src/middleware/option/IMiddlewareOption.ts) interface.
100100

101101
```typescript
102102
try {
103103
let res = await client
104104
.api("/me/messages")
105-
.middlewareOption([new RetryHandlerOption(5000)])
105+
.middlewareOptions([new RetryHandlerOption(5000)])
106106
.get();
107107
console.log(res);
108108
} catch (error) {

0 commit comments

Comments
 (0)