create-request 0.0.1-beta.10 → 0.0.1-beta.12
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/library/index.d.ts +4 -14
- package/dist/library/index.esm.js +1 -1906
- package/dist/library/index.esm.js.map +1 -0
- package/dist/library/index.js +1 -1930
- package/dist/library/index.js.map +1 -0
- package/dist/library/utils/sizeUtils.d.ts +8 -0
- package/package.json +34 -12
package/dist/library/index.d.ts
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
import { get, put, head, post, patch, del, options } from "./requestFactories";
|
|
2
2
|
import { Config } from "./utils/Config";
|
|
3
3
|
export { HttpMethod, RequestPriority, CredentialsPolicy, RequestMode, RedirectMode, CacheMode, SameSitePolicy, ReferrerPolicy } from "./enums";
|
|
4
|
-
export type { RetryCallback, RequestOptions,
|
|
5
|
-
export {
|
|
4
|
+
export type { RetryCallback, RequestOptions, CookiesRecord, CookieOptions } from "./types";
|
|
5
|
+
export type { StorageProvider } from "./utils/StorageProvider";
|
|
6
|
+
export type { CacheOptions } from "./types/cache";
|
|
6
7
|
export { ResponseWrapper } from "./ResponseWrapper";
|
|
7
8
|
export { CookieUtils } from "./utils/CookieUtils";
|
|
9
|
+
export { RequestError } from "./RequestError";
|
|
8
10
|
export { GetRequest, PostRequest, PutRequest, DeleteRequest, PatchRequest, HeadRequest, OptionsRequest } from "./requestMethods";
|
|
9
11
|
export { createMemoryStorage, createLocalStorageStorage, createSessionStorageStorage } from "./utils/CacheStorage";
|
|
10
12
|
export { CacheManager } from "./utils/CacheManager";
|
|
11
|
-
export type { CacheOptions } from "./types/cache";
|
|
12
|
-
export type { StorageProvider } from "./utils/StorageProvider";
|
|
13
13
|
/**
|
|
14
14
|
* Main API object for creating HTTP requests
|
|
15
15
|
* Provides factory methods for all HTTP methods and access to global configuration.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* // Making a GET request
|
|
19
|
-
* const users = await create.get()
|
|
20
|
-
* .withQueryParams({ limit: 10 })
|
|
21
|
-
* .sendTo('/api/users')
|
|
22
|
-
* .getJson();
|
|
23
|
-
*
|
|
24
|
-
* // Configure global settings
|
|
25
|
-
* create.config.setCsrfToken('token123');
|
|
26
16
|
*/
|
|
27
17
|
declare const create: {
|
|
28
18
|
readonly get: typeof get;
|