Class NodeConnector

Hierarchy

Constructors

  • Parameters

    • host: string
    • port: number
    • secure: boolean
    • basePath: string

    Returns NodeConnector

Properties

basePath: string

The base path of the api endpoint

cookie: null | string
host: string

the host to connect to

http: any
origin: string = ...

the origin do not contains the base path

port: number

the port to connect to

secure: boolean

true for an secure connection

DEFAULT_BASE_PATH: "/v1" = '/v1'
HTTP_DOMAIN: ".app.baqend.com" = '.app.baqend.com'
RESPONSE_HEADERS: string[] = ...

An array of all exposed response headers

connections: {
    [origin: string]: Connector;
} = {}

Array of all created connections

Type declaration

connectors: (Class<Connector> & typeof Connector)[] = []

Array of all available connector implementations

Methods

  • Convert received data to the requested response entity type

    Returns

    Parameters

    • response: Response

      The response object

    • entity: any

      The received data

    • type: null | ResponseBodyType

      The requested response format

    Returns any

  • Parse the cookie header

    Returns

    Parameters

    • header: string

    Returns null | string

  • Convert the message entity to the sendable representation

    Returns

    Parameters

    • message: Message

      The message to send

    Returns void

  • Returns

    Parameters

    • host: string

      or location

    • Optional port: number
    • Optional secure: boolean
    • Optional basePath: string

      The basepath of the api

    Returns Connector

  • Indicates id this connector is usable in the current runtime environment This method must be overwritten in subclass implementations

    Returns

    true if this connector is usable in the current environment

    Returns boolean

  • Parameters

    • host: string
    • port: number
    • secure: boolean
    • basePath: string

    Returns string

Generated using TypeDoc