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: {} = {}

      The base fetch options

      Returns Wretch

      A fresh wretch instance

    Generated using TypeDoc