response.statusMessage

response.statusMessage When using implicit headers (not calling response.writeHead() explicitly), this property controls the status message that will be sent to the client when the headers get flushed. If this is left as undefined then the standard message for the status code will be used. Example: response.statusMessage = 'Not found'; After response header was sent to the client, this property indicates the status message which was sent out.

response.statusCode

response.statusCode When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed. Example: response.statusCode = 404; After response header was sent to the client, this property indicates the status code which was sent out.

response.setHeader()

response.setHeader(name, value) Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name. Example: response.setHeader('Content-Type', 'text/html'); or response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); Attempting to set a header field name or value that contains invalid characters will result in a TypeError bei

response.setTimeout()

response.setTimeout(msecs, callback) msecs <Number> callback <Function> Sets the Socket's timeout value to msecs. If a callback is provided, then it is added as a listener on the 'timeout' event on the response object. If no 'timeout' listener is added to the request, the response, or the server, then sockets are destroyed when they time out. If you assign a handler on the request, the response, or the server's 'timeout' events, then it is your responsibility to handle timed

response.headersSent

response.headersSent Boolean (read-only). True if headers were sent, false otherwise.

response.removeHeader()

response.removeHeader(name) Removes a header that's queued for implicit sending. Example: response.removeHeader('Content-Encoding');

response.getHeader()

response.getHeader(name) Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive. This can only be called before headers get implicitly flushed. Example: var contentType = response.getHeader('content-type');

response.sendDate

response.sendDate When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true. This should only be disabled for testing; HTTP requires the Date header in responses.

response.finished

response.finished Boolean value that indicates whether the response has completed. Starts as false. After response.end() executes, the value will be true.

response.addTrailers()

response.addTrailers(headers) This method adds HTTP trailing headers (a header but at the end of the message) to the response. Trailers will only be emitted if chunked encoding is used for the response; if it is not (e.g., if the request was HTTP/1.0), they will be silently discarded. Note that HTTP requires the Trailer header to be sent if you intend to emit trailers, with a list of the header fields in its value. E.g., response.writeHead(200, { 'Content-Type': 'text/plain',