Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface used to abstract implementation details to allow for NodeJS and Browser usage of the library.

Hierarchy

  • HttpSupport

Index

Constructors

constructor

Properties

Protected logger

logger: Logger = Logger.create()

xmlHttp

xmlHttp: any

The instance of the call interface

xmlHttpImplClass

xmlHttpImplClass: any

This is the xmlhttprequest implementation. This is odd, but it is how we can keep ourselves from being tied to a browser.

A NodeJS app that uses this library would pass in a different object than a browser implementation. NodeJS has an object that satisfies the requirements of the xmlhttprequest (looks the same).

https://www.npmjs.com/package/xmlhttprequest

Methods

deleteData

  • deleteData(endpoint: string, onDataLoaded: Function, onError: Function): void
  • Make the REST call to get the data

    Parameters

    • endpoint: string
    • onDataLoaded: Function
    • onError: Function

    Returns void

doXmlHttp

  • doXmlHttp(method: string, endpoint: string, onDataLoaded: Function, onError: Function): void
  • Make the REST call to get the data

    Parameters

    • method: string
    • endpoint: string
    • onDataLoaded: Function
    • onError: Function

    Returns void

doXmlHttpSendJson

  • doXmlHttpSendJson(method: string, sendData: any, endpoint: string, onDataLoaded: Function, onError: Function, additionalHeaders?: any): void
  • Parameters

    • method: string
    • sendData: any
    • endpoint: string
    • onDataLoaded: Function
    • onError: Function
    • Optional additionalHeaders: any

    Returns void

getData

  • getData(endpoint: string, onDataLoaded: Function, onError: Function): void
  • Make the REST call to get the data

    Parameters

    • endpoint: string
    • onDataLoaded: Function
    • onError: Function

    Returns void

getResponseHeader

  • getResponseHeader(headerName: string): string

options

  • options(endpoint: string, onDataLoaded: Function, onError: Function): void
  • Make the REST call to get the data

    Parameters

    • endpoint: string
    • onDataLoaded: Function
    • onError: Function

    Returns void

postData

  • postData(endpoint: string, onDataLoaded: Function, onError: Function, sendData: any, additionalHeaders?: any): void
  • Make the REST call to get the data

    Parameters

    • endpoint: string
    • onDataLoaded: Function
    • onError: Function
    • sendData: any
    • Optional additionalHeaders: any

    Returns void

putData

  • putData(endpoint: string, onDataLoaded: Function, onError: Function, sendData: any): void
  • Make the REST call to get the data

    Parameters

    • endpoint: string
    • onDataLoaded: Function
    • onError: Function
    • sendData: any

    Returns void

Private setXmlHttpCallback

  • setXmlHttpCallback(xmlHttpInst: any, endpoint: string, onDataLoaded: Function, onError: Function): void
  • Parameters

    • xmlHttpInst: any
    • endpoint: string
    • onDataLoaded: Function
    • onError: Function

    Returns void

Generated using TypeDoc