Class FetchConnector

Hierarchy

Constructors

  • Parameters

    • host: string

      the host to connect to

    • port: number

      the port to connect to

    • secure: boolean

      true for an secure connection

    • basePath: string

      The base path of the api endpoint

    Returns FetchConnector

Properties

basePath: string

The base path of the api endpoint

host: string

the host to connect to

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

  • Handle the actual message send

    Parameters

    Returns Promise<void>

  • Convert received data to the requested response entity type

    Returns

    Parameters

    • response: Response

      The response object

    • rawEntity: any

      The received data

    • type: null | ResponseBodyType

      The requested response format

    Returns any

  • 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 if this connector implementation is usable for the given host and port

    Returns

    Returns boolean

  • Parameters

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

    Returns string

Generated using TypeDoc