Interface CustomFetch

Represents a custom implementation of the apprt-fetch library. Used for testing.

interface CustomFetch {
    config: Config;
    destroy(): void;
    fetch(target, init?): Promise<Response>;
    fetchJson<T>(target, init?): Promise<T>;
}

Properties

Methods

Properties

config: Config

A separate instance of the configuration (non-global).

Methods

  • Call this method to clean up any state associated with this instance.

    Returns void

  • Fetches the given target and returns the response.

    Parameters

    Returns Promise<Response>

  • Fetches JSON data from the given target and returns the response data.

    Type Parameters

    • T = unknown

    Parameters

    Returns Promise<T>

Generated using TypeDoc