Module: nationscript/requests/misc

Internal module providing specialised request builder classes for addressing various API endpoints that don't fit under any other module.

Classes

TGRequest
UserAgentRequest
VersionRequest

Methods

(inner) streamToString(stream) → {Promise.<string>}

Reads the given streamed response, recording its contents as text and returning it once the stream ends.

Parameters:
Name Type Description
stream IncomingMessage

API response to parse

See:
Returns:

Text data received from the stream

Type
Promise.<string>