Class HttpClient

Handle HTTP requests with a uniform interface.

Hierarchy

  • HttpClient

Constructors

Properties

DEFAULT_REQUEST: {
    method: string;
    rejectUnauthorized: boolean;
    resolveWithFullResponse: boolean;
} = ...

Type declaration

  • method: string
  • rejectUnauthorized: boolean
  • resolveWithFullResponse: boolean
DEFAULT_TIMEOUT: number = 60000
HTTPS_AGENT: any
HTTP_AGENT: any
MAX_REQUESTS_PER_SECOND: number = 50
MAX_TIMEOUT: number = 2147483647
PROMISE_THROTTLES: any[] = []
TASK_QUEUES: any[] = []
axiosDigestAuthRequest: ((method, url, username, password, body) => Promise<AxiosResponse<any, any>>) = ...

Type declaration

    • (method, url, username, password, body): Promise<AxiosResponse<any, any>>
    • Parameters

      • method: any
      • url: any
      • username: any
      • password: any
      • body: any

      Returns Promise<AxiosResponse<any, any>>

Methods

  • Get a singleton instance of an HTTP client to share.

    Returns any

    a shared agent for network requests among library instances

  • Get a singleton instance of an HTTPS client to share.

    Returns any

    a shared agent for network requests among library instances

  • Make a HTTP request.

    Parameters

    • request: any

      configures the request to make

    Returns Promise<any>

    response - the response object

  • Parameters

    • req: any

    Returns Promise<any>

Generated using TypeDoc