Skip to content

Commit 2fb6205

Browse files
committed
chore(doc): add documentation for retryOnAbort configuration
1 parent cd12403 commit 2fb6205

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/sdk/api/sdkMiddlewareHttp.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ The HTTP middleware can run in either a browser or Node.js environment. For Node
3838
9. `retryDelay` _(Number)_: amount of milliseconds to wait before retrying the next request. (Default: 200)
3939
10. `backoff` _(Boolean)_: activates exponential backoff. Recommended to prevent spamming of the server. (Default: true)
4040
11. `maxDelay` _(Number)_: The maximum duration (milliseconds) to wait before retrying, useful if the delay time grew exponentially more than reasonable
41-
12. `fetch` _(Function)_: A `fetch` implementation which can be e.g. `node-fetch` or `unfetch` but also the native browser `fetch` function
42-
13. `timeout` _(Number)_: Request/response timeout in ms. Must have globally available or passed in `AbortController`
43-
14. `abortController` or `getAbortController` depending on you chose to handle the timeout (_abortController_): This property accepts the `AbortController` instance. Could be [abort-controller](https://www.npmjs.com/package/abort-controller) or globally available one.
41+
12. `retryOnAbort` _(Boolean)_: Configure the client to retry an aborted request or not. defaults to false.
42+
13. `fetch` _(Function)_: A `fetch` implementation which can be e.g. `node-fetch` or `unfetch` but also the native browser `fetch` function
43+
14. `timeout` _(Number)_: Request/response timeout in ms. Must have globally available or passed in `AbortController`
44+
15. `abortController` or `getAbortController` depending on you chose to handle the timeout (_abortController_): This property accepts the `AbortController` instance. Could be [abort-controller](https://www.npmjs.com/package/abort-controller) or globally available one.
4445

4546
#### Retrying requests
4647

@@ -70,9 +71,11 @@ const client = createClient({
7071
maxRetries: 2,
7172
retryDelay: 300, //milliseconds
7273
maxDelay: 5000, //milliseconds
74+
retryOnAbort: false,
7375
},
7476

7577
// Optional if not globally available
78+
timeout: 1000,
7679
fetch,
7780
}),
7881
],

0 commit comments

Comments
 (0)