SongGuess
    Preparing search index...
    Response: {
        prototype: Response;
        error(): Response;
        json(data: any, init?: ResponseInit): Response;
        redirect(url: string | URL, status?: number): Response;
        new (body?: BodyInit | null, init?: ResponseInit): Response;
    }

    The Response interface of the Fetch API represents the response to a request.

    MDN Reference

    Type Declaration

    • prototype: Response
    • error: function
      • The error() static method of the Response interface returns a new Response object associated with a network error.

        MDN Reference

        Returns Response

    • json: function
      • The json() static method of the Response interface returns a Response that contains the provided JSON data as body, and a Content-Type header which is set to application/json. The response status, status message, and additional headers can also be set.

        MDN Reference

        Parameters

        Returns Response

    • redirect: function
      • The redirect() static method of the Response interface returns a Response resulting in a redirect to the specified URL.

        MDN Reference

        Parameters

        • url: string | URL
        • Optionalstatus: number

        Returns Response