We always write:
http.createServer(function(req, res) {
req.on('data', function(){})
.on('end', function(){});
});
Event: data
Event: end
Class: http.IncomingMessage
At the documentation for HTTP.IncomingMessage, it says:
It implements the Readable Stream interface, as well as the following additional events, methods, and properties.
If you check the Stream.Readable documentation, you can find Event: 'data'
and Event: 'end'
.