reykit 1.0.62 → 1.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1110 -1103
- package/dist/net.d.ts +4 -1
- package/package.json +1 -1
package/dist/net.d.ts
CHANGED
|
@@ -19,10 +19,13 @@
|
|
|
19
19
|
* @param option.headers - Request header data.
|
|
20
20
|
* @param option.method - Request method.
|
|
21
21
|
* - `undefined` : Automatic judge. When parameter `data` not has value, then is `get`, otherwise is `post`.
|
|
22
|
+
* @param option.check - Whether to throw an error if the response is not in the 200–299 range.
|
|
23
|
+
* - `undefined` : False.
|
|
22
24
|
*/
|
|
23
|
-
export declare function request(url: string, { params, body, headers, method }: {
|
|
25
|
+
export declare function request(url: string, { params, body, headers, method, check, }: {
|
|
24
26
|
params?: Record<string, string | number | boolean>;
|
|
25
27
|
body?: URLSearchParams | File | FormData | Blob | Record<string, any> | string;
|
|
26
28
|
headers?: Record<string, string | number | boolean>;
|
|
27
29
|
method?: 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'head';
|
|
30
|
+
check?: boolean;
|
|
28
31
|
}): Promise<Response>;
|