Extension of native fetch with:
- Retryable requests
- Request timeout
- Standalone HTTP utilities
-
timeout
number | stringRequest timeout
-
retry
Object-
limit
numberDefault: 1
-
methods
string[] | falseDefault: [DELETE, GET, HEAD, PATCH, PUT]
-
delay
number | string | resolverDefault: 100
-
-
json
anyShortcut for sending JSON serialized data. Equivalent to:
{ headers: { 'content-type': 'application/json', 'accept': 'application/json', }, body: JSON.stringify(value), }
-
body()
Infer and execute body parser based on
content-type