IncomingMessage

http~ IncomingMessage

new IncomingMessage(httpClient) protected

Result of HTTP request
Arguments:
  1. httpClient (THTTPClient)
Implements:

Members

encoding: String

Default encoding for read call

statusCode: Number readonly

HTTP status code. See also {STATUS_CODES}

Methods

setEncoding(encoding)

Change default encoding for read request
Arguments:
  1. encoding (String)

read(encodingopt)

Read a response body. See UBReader#read for parameters
Arguments:
  1. [encoding] (String)  If omitted this.encoding in used
Implements:

headers(headeropt) → Object:.<string:, string:>|String

Return response headers, transformed to JS object. Headers name is a keys (in lower case).
Arguments:
  1. [header] (String)  Of passed - return only this header value, else - all headers