Class BaseRequester

Handles basic HTTP requests to the API.

Constructors

Methods

Constructors

Methods

  • Makes a generic HTTP request.

    Parameters

    • url: string

      The target URL for the request.

    • token: string

      Authorization token for the request.

    • options: RequestInit = {}

      Additional request options.

    Returns Promise<Response>

  • Sends a GET request to the specified API endpoint.

    Parameters

    • token: string

      Authorization token for the request.

    • endpoint: string

      API endpoint to send the GET request to.

    Returns Promise<Response>

  • Sends a POST request to the specified API endpoint.

    Parameters

    • token: string

      Authorization token for the request.

    • endpoint: string

      API endpoint to send the POST request to.

    • Optionalbody: BodyInit

      The body for the request.

    Returns Promise<Response>