@hokuto/jam-node
Version:
JAM Node TS, guardians and utils
16 lines (15 loc) • 1.04 kB
TypeScript
import { RequestInfo, RequestInit, Response } from "node-fetch";
import { FetchOptions } from "../types.js";
import { BlobContentType, FetchContentType } from "@hokuto/jam-core";
export declare function apiFetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
export declare function apiProps(url: string, options?: FetchOptions): {
url: string;
headers: import("node-fetch").HeadersInit;
method: string;
body: import("node-fetch").BodyInit | null | undefined;
};
export declare function jsonFetch<T>(baseurl: string, options?: FetchOptions): Promise<Awaited<T>>;
export declare function uploadFetch<T = string>(baseurl: string, options?: FetchOptions, contentType?: FetchContentType): Promise<Awaited<T>>;
export declare function blobFetch(baseurl: string, options?: FetchOptions, contentType?: BlobContentType): Promise<Blob>;
export declare function pngFetch(baseurl: string, options?: FetchOptions): Promise<Blob>;
export declare function svgFetch(baseurl: string, options?: FetchOptions): Promise<Blob>;