Extension of native fetch with:
- Retryable requests
- Request timeout
- Standalone HTTP utilities
-
timeoutnumber | stringRequest timeout
-
retryObject-
limitnumberDefault: 1
-
methodsstring[] | falseDefault: [DELETE, GET, HEAD, PATCH, PUT]
-
delaynumber | string | resolverDefault: 100
-
-
jsonanyShortcut 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