mirror of
https://git.mirrors.martin98.com/https://github.com/cyberman54/curl
synced 2026-04-24 14:08:06 +08:00
fix: validate status and some security
This commit is contained in:
22
node_modules/is-retry-allowed/index.d.ts
generated
vendored
Normal file
22
node_modules/is-retry-allowed/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
Check whether a request can be retried based on the `error.code`.
|
||||
|
||||
@param error - The `.code` property, if it exists, will be used to determine whether retry is allowed.
|
||||
|
||||
@example
|
||||
```
|
||||
import isRetryAllowed = require('is-retry-allowed');
|
||||
|
||||
isRetryAllowed({code: 'ETIMEDOUT'});
|
||||
//=> true
|
||||
|
||||
isRetryAllowed({code: 'ENOTFOUND'});
|
||||
//=> false
|
||||
|
||||
isRetryAllowed({});
|
||||
//=> true
|
||||
```
|
||||
*/
|
||||
declare function isRetryAllowed(error?: Error | Record<string, unknown>): boolean;
|
||||
|
||||
export = isRetryAllowed;
|
||||
Reference in New Issue
Block a user