You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timeout in milliseconds for getting a response. Each retry attempt gets the full timeout. Cannot be greater than 2147483647.
386
+
Per-attempt timeout in milliseconds for getting a response, applied independently to each retry. Cannot be greater than 2147483647. See also [`totalTimeout`](#totaltimeout).
387
387
388
-
If set to `false`, there will be no timeout.
388
+
If set to `false`, there will be no per-attempt timeout.
389
389
390
390
##### totalTimeout
391
391
392
392
Type: `number | false`\
393
393
Default: `false`
394
394
395
-
Total timeout in milliseconds for the entire operation, including all retries and delays. Cannot be greater than 2147483647. Throws a `TimeoutError` if exceeded.
395
+
Overall timeout in milliseconds for the entire operation, including retries and delays. Throws a `TimeoutError` if exceeded. Cannot be greater than 2147483647.
396
396
397
-
This is useful when you want to cap the total time spent on an operation, while still allowing each individual retry to use the full per-attempt `timeout`.
397
+
If set to `false` or not specified, there is no overall timeout.
Copy file name to clipboardExpand all lines: source/types/options.ts
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -187,20 +187,18 @@ export type KyOptions = {
187
187
retry?: RetryOptions|number;
188
188
189
189
/**
190
-
Timeout in milliseconds for getting a response. Each retry attempt gets the full timeout. Cannot be greater than 2147483647.
190
+
Per-attempt timeout in milliseconds for getting a response, applied independently to each retry. Cannot be greater than 2147483647. See also `totalTimeout`.
191
191
192
-
If set to `false`, there will be no timeout.
192
+
If set to `false`, there will be no per-attempt timeout.
193
193
194
194
@default 10000
195
195
*/
196
196
timeout?: number|false;
197
197
198
198
/**
199
-
Total timeout in milliseconds for the entire operation, including all retries and delays. Cannot be greater than 2147483647. Throws a `TimeoutError` if exceeded.
199
+
Overall timeout in milliseconds for the entire operation, including retries and delays. Throws a `TimeoutError` if exceeded. Cannot be greater than 2147483647.
200
200
201
-
This is useful when you want to cap the total time spent on an operation, while still allowing each individual retry to use the full per-attempt `timeout`.
202
-
203
-
If set to `false` or not specified, there is no total timeout.
201
+
If set to `false` or not specified, there is no overall timeout.
0 commit comments