# new IncomingMessage (httpClientTHTTPClient)

Arguments:

Members

# encoding : String instance

Default encoding for read call

# statusCode : Number instance

HTTP status code. See also {STATUS_CODES}

Methods

# json () instance

Read a response body and parse it as JSON. Expect body in UTF8 encoding. Faster and uses less memory compared to JSON.parse(req.read('utf8'))

# read (encodingoptString) instance

Read a response body. See UBReader#read for parameters

Arguments:
  • encoding: String

    If omitted this.encoding in used

# setEncoding (encodingString) instance

Change default encoding for read request

Arguments: