response.end([data[, encoding]][, callback])


此方法向服务器触发信号,表明已发送所有响应标头和正文;该服务器应认为此消息已完成。response.end() 方法必须在每个响应上调用。

¥This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.

如果指定了 data,则其效果类似于调用 response.write(data, encoding) 后跟 response.end(callback)

¥If data is specified, it is similar in effect to calling response.write(data, encoding) followed by response.end(callback).

如果指定了 callback,则将在响应流完成时调用。

¥If callback is specified, it will be called when the response stream is finished.