@lumera/sdk-js
    Preparing search index...

    Class HttpClient

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Perform a DELETE request

      Type Parameters

      • T = unknown

      Parameters

      • path: string

        Request path (relative to baseUrl)

      • Optionaloptions: RequestOptions

        Request options

      Returns Promise<T>

      Response data

      If the request fails

    • Perform a GET request

      Type Parameters

      • T = unknown

      Parameters

      • path: string

        Request path (relative to baseUrl)

      • Optionaloptions: RequestOptions

        Request options

      Returns Promise<T>

      Response data

      If the request fails

    • Perform a PATCH request

      Type Parameters

      • T = unknown

      Parameters

      • path: string

        Request path (relative to baseUrl)

      • Optionalbody: unknown

        Request body (will be JSON stringified)

      • Optionaloptions: RequestOptions

        Request options

      Returns Promise<T>

      Response data

      If the request fails

    post

    • post<T = unknown>(
          path: string,
          body?: unknown,
          options?: RequestOptions,
      ): Promise<T>

      Perform a POST request

      Type Parameters

      • T = unknown

      Parameters

      • path: string

        Request path (relative to baseUrl)

      • Optionalbody: unknown

        Request body (will be JSON stringified)

      • Optionaloptions: RequestOptions

        Request options

      Returns Promise<T>

      Response data

      If the request fails

    • Perform a PUT request

      Type Parameters

      • T = unknown

      Parameters

      • path: string

        Request path (relative to baseUrl)

      • Optionalbody: unknown

        Request body (will be JSON stringified)

      • Optionaloptions: RequestOptions

        Request options

      Returns Promise<T>

      Response data

      If the request fails

    • Perform an HTTP request with streaming response support

      Returns the raw Response object for streaming or custom handling. The caller is responsible for reading and closing the response body.

      Parameters

      • method: string

        HTTP method

      • path: string

        Request path

      • Optionalbody: unknown

        Request body

      • Optionaloptions: RequestOptions

        Request options

      Returns Promise<Response>

      Raw Response object

      If the request fails