Class: NodeConnector

connector.NodeConnector()

new NodeConnector()

Source:

Extends

Members

(readonly) basePath :string

Type:
  • string
Inherited From:
Source:

doSend

Handle the actual message send

Overrides:
Source:

(readonly) host :string

Type:
  • string
Inherited From:
Source:

(readonly) origin :string

the origin do not contains the basepath

Type:
  • string
Inherited From:
Source:

(readonly) port :number

Type:
  • number
Inherited From:
Source:

(readonly) secure :boolean

Type:
  • boolean
Inherited From:
Source:

Methods

(protected) fromFormat(response, entity, type) → {*}

Convert received data to the requested response entity type

Parameters:
Name Type Description
response Object

The response object

entity *

The received data

type string

The requested response format

Overrides:
Source:
Returns:
Type
*

parseCookie(header) → {string|null}

Parse the cookie header

Parameters:
Name Type Description
header string
Source:
Returns:
Type
string | null

prepareRequest(message) → {void}

Parameters:
Name Type Description
message connector.Message
Inherited From:
Source:
Returns:
Type
void

prepareResponse(message, response) → {Promise.<*>}

Parameters:
Name Type Description
message connector.Message
response Object

The received response headers and data

Inherited From:
Source:
Returns:
Type
Promise.<*>

send(message) → {Promise.<connector.Message>}

Parameters:
Name Type Description
message connector.Message
Inherited From:
Source:
Returns:
Type
Promise.<connector.Message>

(protected) toFormat(message) → {void}

Convert the message entity to the sendable representation

Parameters:
Name Type Description
message connector.Message

The message to send

Overrides:
Source:
Returns:
Type
void