AniLink - v1.29.2
    Preparing search index...

    Function sendRequest

    • Sends a request to the specified URL.

      Type Parameters

      • T = unknown

      Parameters

      • url: string

        The URL to send the request to.

      • method: "GET" | "POST"

        The HTTP method to use ('GET' or 'POST').

      • Optionaldata: object

        The data to send with the request.

      • Optionaltoken: string

        The authentication token to include in the request headers.

      • requiresAuth: boolean = false

        Whether the operation requires an authentication token.

      Returns Promise<T>

      The unwrapped response data. For operations with a single root field this is the bare field value; otherwise it is the full { data } envelope. Use unwrapGraphQLResponse to apply the same rule to a response yourself.

      An error if the request fails.