Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AxiosHTTP

Implementation of the IOnmsHTTP interface using Axios: https://github.com/mzabriskie/axios

implements

IOnmsHTTP

Hierarchy

Implements

Index

Constructors

constructor

  • Construct an AxiosHTTP instance.

    Parameters

    • Optional server: OnmsServer

      The server to connect to.

    • Optional axiosImpl: AxiosStatic

      The Axios implementation class to use.

    • Default value timeout: number = 10000

      The default timeout for ReST connections.

    Returns AxiosHTTP

Properties

Private axiosObj

axiosObj: AxiosInstance

The Axios instance we'll use for making ReST calls. This will be reinitialized whenever the server configuration changes.

options

options: OnmsHTTPOptions = {} as OnmsHTTPOptions

The default set of HTTP options associated with this ReST client.

timeout

timeout: number

The default amount of time to wait before giving up on a request.

deprecated

Set timeout on the OnmsHTTPOptions object instead. This will go away in OpenNMS.js 2.0.

Accessors

server

Methods

get

Protected getData

  • getData(response: any): any

Protected getOptions

Protected getServer

httpDelete

Protected onSetServer

  • onSetServer(): void

post

put

Protected transformJSON

  • transformJSON(data: any): any

Protected transformXML

  • transformXML(data: any): any

Generated using TypeDoc