Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Class: http.ServerResponse
Added in: v0.1.17
This object is created internally by an HTTP server — not by the user. It is passed as the second parameter to the 'request' event.
The response inherits from Stream , and additionally implements the following:
Stream.end(): https://nodejs.org/api/stream.html#stream_writable...
https://js-node.ru/site/article?id=41#stream_writa...Calling the writable.end() method signals that there is no more data to write to the stream opened for writing. The optional arguments chunk and encoding allow the last extra chunk of data to be written just before the stream closes. When an optional callback function is provided, it is added as a listener for the 'finish' event.
Calling the stream.write() method after calling stream.end() will result in an error.
And what is the difficulty in simply reading the documentation?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question