Options
All
  • Public
  • Public/Protected
  • All
Menu
description

This class contains methods for executing remote API calls, e.g. calling a GET HTTP API endpoint.

since

v0.3.0

Hierarchy

  • HttpRequestHandler

Index

Constructors

Methods

Constructors

Methods

  • call(url: string, method?: HttpMethod, body?: any, options?: any, headers?: any): Promise<AxiosResponse<any, any>>
  • This method implements the logic to execute HTTP requests using the axios dependency.

    Methods currently supported include: GET, POST.

    access

    public

    async

    Parameters

    • url: string

      The exact URL to be called for the request, e.g. "http://localhost:7903/auth/challenge".

    • method: HttpMethod = "GET"

      A HTTP method name, e.g. "GET". Defaults to "GET".

    • body: any = {}

      A configuration object that is forwarded to axios as the request body (POST requests).

    • options: any = {}

      A configuration object that is forwarded to axios as the request options.

    • headers: any = {}

      A configuration object that is forwarded to axios as the request headers.

    Returns Promise<AxiosResponse<any, any>>

    The {@link Promise} that contains the result {@link AxiosResponse}.

Generated using TypeDoc