Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractHTTP

Hierarchy

Implements

Index

Constructors

constructor

  • Create a new AbstractHTTP instance.

    constructor

    Parameters

    • Optional server: OnmsServer

      a server object for immediate configuration

    • Default value timeout: number = 10000

      how long to wait until timing out requests

    Returns AbstractHTTP

Properties

options

the authorization config associated with this ReST client

Private serverObj

serverObj: OnmsServer

the server metadata we'll use for constructing ReST calls

timeout

timeout: number = 10000

how long to wait before giving up on a given request

Accessors

server

  • the server associated with this HTTP implementation

    Returns OnmsServer

  • the server associated with this HTTP implementation

    Parameters

    Returns void

Methods

get

  • make an HTTP GET call -- this should be overridden by the implementation

    Parameters

    Returns Promise<OnmsResult<any>>

Protected getOptions

  • combine all options from the given options, the current server, and the default options

    Parameters

    Returns any

Protected getServer

  • get the server in the options object, or fall back to the one assigned to the HTTP impl

    Parameters

    Returns OnmsServer

Protected onSetServer

  • onSetServer(): void
  • useful for performing an action (like clearing caches) when the server is set

    Returns void

put

  • make an HTTP PUT call -- this should be overridden by the implementation

    Parameters

    Returns Promise<OnmsResult<any>>

Protected transformJSON

  • transformJSON(data: any): any
  • a convenience method for implementers to use to turn JSON into a javascript 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

    Parameters

    • data: any

    Returns any

Generated using TypeDoc