From 7780bda3f162e722a424ec776e47117fe388a69d Mon Sep 17 00:00:00 2001 From: Kir_Antipov <kp.antipov@gmail.com> Date: Thu, 16 Feb 2023 13:05:22 +0000 Subject: [PATCH] Added `net` module --- src/utils/net/index.ts | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/utils/net/index.ts diff --git a/src/utils/net/index.ts b/src/utils/net/index.ts new file mode 100644 index 0000000..707e086 --- /dev/null +++ b/src/utils/net/index.ts @@ -0,0 +1,80 @@ +export { + Fetch, + ConfigurableFetch, + FetchOptions, + + fetch, + + createFetch, + fetchDestinationEquals, +} from "./fetch"; + +export { + defaultResponse, + throwOnError, + simpleCache, +} from "./fetch-middlewares"; + +export { + UploadedFile as DownloadableFile, +} from "../../platforms/uploaded-file"; + +export { + FILE_PATH, +} from "./form-data"; + +export { + QueryString, + + isQueryString, +} from "./query-string"; + +export { + HttpRequest, +} from "./http-request"; + +export { + HttpResponse, + HttpResponseType, + HttpResponseOptions, +} from "./http-response"; + +export { + HttpMethod, + + httpMethodEquals, + canHttpMethodAcceptBody, + isGetHttpMethod, + isPostHttpMethod, + isDeleteHttpMethod, + isOptionsHttpMethod, + isPatchHttpMethod, + isPutHttpMethod, + isHeadHttpMethod, + isConnectHttpMethod, + isTraceHttpMethod, +} from "./http-method"; + +export { + HttpRequestBody, + + isHttpRequestBody, + isStreamableHttpRequestBody, +} from "./http-request-body"; + +export { + Headers, + + hasHeader, + getHeader, + setHeader, + setHeaders, + appendHeader, + appendHeaders, + setDefaultHeader, + setDefaultHeaders, + deleteHeader, + deleteHeaders, + cloneHeaders, + inferHttpRequestBodyHeaders, +} from "./headers";