wretch
    Preparing search index...

    Function default

    • Creates a new wretch instance with a base url and base fetch options.

      import wretch from "wretch"

      // Reusable instance
      const w = wretch("https://domain.com", { mode: "cors" })

      Parameters

      • _url: string = ""

        The base url

      • _options: WretchOptions = {}

        The base fetch options

      Returns Wretch

      A fresh wretch instance

    Index

    Properties

    Properties

    default: {
        default: { (_url?: string, _options?: WretchOptions): Wretch<unknown, unknown, undefined, undefined>; default: ...; WretchError: typeof WretchError; };
        WretchError: typeof WretchError;
        (_url?: string, _options?: WretchOptions): Wretch;
    }

    Type Declaration

      • (_url?: string, _options?: WretchOptions): Wretch
      • Creates a new wretch instance with a base url and base fetch options.

        import wretch from "wretch"

        // Reusable instance
        const w = wretch("https://domain.com", { mode: "cors" })

        Parameters

        • _url: string = ""

          The base url

        • _options: WretchOptions = {}

          The base fetch options

        Returns Wretch

        A fresh wretch instance

    • default: { (_url?: string, _options?: WretchOptions): Wretch<unknown, unknown, undefined, undefined>; default: ...; WretchError: typeof WretchError; }
    • WretchError: typeof WretchError
    WretchError: typeof WretchError