A simple API client that uses Basic Auth to authenticate with the API

Implements

  • SimpleHttpClientInterface

Constructors

Properties

Methods

Constructors

Properties

config: Readonly<{
    env: string;
    key: string;
    secret: string;
    baseUrl: string;
}>

Type declaration

  • env: string

    The current application environment

  • key: string

    The key/id for this API

  • secret: string

    The secret for this API

  • baseUrl: string

    The base url for the API. Note that you can include the string ${env} in the base url and it will be replaced by the current value of env.

httpClient: SimpleHttpClientInterface
authString: string
log: SimpleLoggerInterface

Methods

  • {inheritDoc SimpleHttpClientInterface["request"]}

    Type Parameters

    • D

    Parameters

    • req: SimpleHttpClientRequestConfig
    • Optional _log: SimpleLoggerInterface

    Returns Promise<SimpleHttpClientResponseInterface<D>>

Generated using TypeDoc