Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultApiClient

Default implementation of services.ApiClient which uses the native HTTP/HTTPS library of Node.JS.

Hierarchy

  • DefaultApiClient

Implements

  • ApiClient

Index

Methods

Methods

invoke

  • invoke(request: ApiClientRequest): Promise<ApiClientResponse>
  • Dispatches a request to an API endpoint described in the request. An ApiClient is expected to resolve the Promise in the case an API returns a non-200 HTTP status code. The responsibility of translating a particular response code to an error lies with the caller to invoke.

    Parameters

    • request: ApiClientRequest

      request to dispatch to the ApiClient

    Returns Promise<ApiClientResponse>

    response from the ApiClient