Class: FetchConnector

connector.FetchConnector()

new FetchConnector()

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

(static) isUsable() → {boolean}

Indicates if this connector implementation is usable for the given host and port

Source:
Returns:
Type
boolean

(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
*

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