Hierarchy (view full)

Implements

Constructors

Properties

timeout: number = 10000

The timeout for requests in milliseconds

Methods

  • Perform a POST request to the CFTools API

    Type Parameters

    • T

    Parameters

    • url: string

      The URL to request

    • body: Record<string, unknown>

      The body of the request

    • isAuthenticating: boolean = false

      Whether the request is for authentication or not

    Returns Promise<T>

    The parsed (JSON) response from the request

  • Perform a PUT request to the CFTools API

    Type Parameters

    • T

    Parameters

    • url: string

      The URL to request

    • body: Record<string, unknown>

      The body of the request

    • isAuthenticating: boolean = false

      Whether the request is for authentication or not

    Returns Promise<T>

    The parsed (JSON) response from the request

  • Perform a request to the CFTools API

    Type Parameters

    • T

    Parameters

    • url: string

      The URL to request

    • options: RequestInit

      The options for the request

    • isAuthenticating: boolean = false

      Whether the request is for authentication or not

    Returns Promise<T>

    The parsed JSON response from the request

    Thrown if the request fails

    Thrown if the request method is invalid

    Thrown if a required parameter is missing

    Thrown if a supplied argument failed type validation

    Thrown if a supplied option is not available for the selected route

    Thrown if the maximum length of a parameter has been exceeded

    Thrown if the minimum length of a parameter has not been reached

    Thrown if the length of a parameter does not match the expected length

    Thrown if a duplicate entry is detected

    Thrown if the client is not authenticated

    Thrown if the authentication token needs to be regenerated

    Thrown if the secret is invalid

    Thrown if the token is invalid

    Thrown if the token has expired

    Thrown if the token has no grant

    Thrown if the requested resource was not found

    Thrown if the requested resource is invalid

    Thrown if the requested bucket is invalid

    Thrown if the rate limit has been exceeded

    Thrown if an unexpected error occurred

    Thrown if the request timed out

    Thrown if the system is unavailable