Interface representing a fetch factory configuration.

IFetchFactory

interface IFetchFactory {
    caller: Function;
    format?:
        | false
        | "text"
        | "json"
        | "blob"
        | "stream";
    headers?: Record<string, string>;
    method:
        | "GET"
        | "POST"
        | "PUT"
        | "PATCH"
        | "DELETE";
}

Properties

caller: Function

The function used to perform the HTTP request.

format?:
    | false
    | "text"
    | "json"
    | "blob"
    | "stream"

Optional response format. If false, raw response is returned.

headers?: Record<string, string>

Optional HTTP request headers.

method:
    | "GET"
    | "POST"
    | "PUT"
    | "PATCH"
    | "DELETE"

The HTTP request method.