Function makeSetch

Make setch function capturing base url and some defaults for reusability sake

  • Parameters

    Returns (
        url: string,
        options?: SetchInit,
        expectedStatus?: ExpectedStatus,
    ) => Promise<Response>

      • (
            url: string,
            options?: SetchInit,
            expectedStatus?: ExpectedStatus,
        ): Promise<Response>
      • Do fetch and throw on unexpected status code, see ExpectedStatus docs for details

        Parameters

        Returns Promise<Response>