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" })

    Returns

    A fresh wretch instance

    Parameters

    • _url: string = ""

      The base url

    • _options: {} = {}

      The base fetch options

      Returns Wretch

    Generated using TypeDoc