Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractHTTP

Abstract implementation of the OnmsHTTP interface meant to be extended by a concrete class.

implements

IOnmsHTTP

Hierarchy

Implements

Index

Constructors

constructor

  • Create a new HTTP instance.

    constructor

    Parameters

    • Optional server: OnmsServer

      A server object for immediate configuration.

    • Optional timeout: number

      How long to wait until timing out requests.

    Returns AbstractHTTP

Accessors

options

server

timeout

  • get timeout(): number
  • set timeout(t: number): void
  • 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.

    Returns number

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

    Parameters

    • t: number

    Returns void

Methods

Abstract get

Protected getData

  • getData(response: any): any

Protected getOptions

Protected getServer

Abstract head

Abstract httpDelete

Protected onSetServer

  • onSetServer(): void
  • Implementers should override this method if they have actions that need to be performed (like clearing a cache) when server settings change.

    Returns void

Abstract post

Abstract put

Protected transformJSON

  • transformJSON(data: any): any
  • A convenience method for implementers to use to turn JSON into a javascript object. Use this to process a JSON response before returning it in an OnmsResult object.

    Parameters

    • data: any

    Returns any

Protected transformXML

  • transformXML(data: any): any
  • A convenience method for implementers to use to turn XML into a javascript object. Use this to process an XML response before returning it in an OnmsResult object.

    Parameters

    • data: any

    Returns any

Generated using TypeDoc