Maximo API Client - v0.9.01
    Preparing search index...

    Class HttpClient

    HTTP client for making requests to the Maximo API

    Index

    Properties

    defaults: { headers: Record<string, string> }
    leanMode: boolean = true
    apihome: string
    contextRoot: string
    cookieJar: CookieJar

    Methods

    • Returns cookie names from raw Set-Cookie header values.

      Parameters

      • cookies: string[]

      Returns string[]

    • Sets whether to use lean mode (reduced response payload) When enabled, 'lean=1' is added as a query parameter

      Parameters

      • enabled: boolean

        Whether to enable lean mode

      Returns void

    • Gets the underlying Axios instance

      Returns AxiosInstance

    • Gets the logger associated with this HTTP client.

      Returns ILogger

    • Sets a default header for all requests

      Parameters

      • name: string

        Header name

      • value: string

        Header value

      Returns void

    • Removes a default header

      Parameters

      • name: string

        Header name

      Returns void

    • Makes a GET request

      Type Parameters

      • T = any

      Parameters

      • url: string

        The URL to request

      • Optionalparams: Record<string, string>

        Query parameters

      • Optionalconfig: AxiosRequestConfig<any>

        Request configuration

      Returns Promise<AxiosResponse<T, any>>

      A promise resolving to the response

    post

    • post<T = any>(
          url: string,
          data?: any,
          config?: AxiosRequestConfig<any>,
      ): Promise<AxiosResponse<T, any>>

      Makes a POST request

      Type Parameters

      • T = any

      Parameters

      • url: string

        The URL to request

      • Optionaldata: any

        The data to send

      • Optionalconfig: AxiosRequestConfig<any>

        Request configuration

      Returns Promise<AxiosResponse<T, any>>

      A promise resolving to the response

    • Makes a PUT request

      Type Parameters

      • T = any

      Parameters

      • url: string

        The URL to request

      • Optionaldata: any

        The data to send

      • Optionalconfig: AxiosRequestConfig<any>

        Request configuration

      Returns Promise<AxiosResponse<T, any>>

      A promise resolving to the response

    • Makes a DELETE request

      Type Parameters

      • T = any

      Parameters

      • url: string

        The URL to request

      • Optionalconfig: AxiosRequestConfig<any>

        Request configuration

      Returns Promise<AxiosResponse<T, any>>

      A promise resolving to the response

    • Makes a PATCH request

      Type Parameters

      • T = any

      Parameters

      • url: string

        The URL to request

      • Optionaldata: any

        The data to send

      • Optionalconfig: AxiosRequestConfig<any>

        Request configuration

      Returns Promise<AxiosResponse<T, any>>

      A promise resolving to the response

    Constructors