class="default no-js"> Connection | xmlmc
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Connection

Index

Constructors

constructor

  • new Connection(server?: string, port?: number): Connection
  • Create a connection. Defers to the private _connect method.

    Parameters

    • Default value server: string = "localhost"

      IP or FQDN to send the requests to

    • Default value port: number = 5015

      Port to use when sending the requests. For https use 443. Defaults to 5015.

    Returns Connection

Properties

Protected endpoint

endpoint: AxiosInstance

Protected https

https: boolean

Protected port

port: number

Protected server

server: string

Protected storeCookies

storeCookies: boolean

Methods

Private _connect

  • _connect(server: string, port: number): void
  • private connect method. Responsible for inferring https. Creates an instance of axios to use to send requests to and from the server.

    Parameters

    • server: string
    • port: number

    Returns void

sendRequest

  • throws

    Module importing error. Occurs if for some reason we were unable to require the underlying modules. Indicates a problem with the library, not the developer.

    Parameters

    Returns Promise<XmlmcResponse>

Generated using TypeDoc

<>