Jason Peng Jason Peng - 11 days ago 4x
Node.js Question

Node.js: Cannot find 'data', 'end' event in http.IncomingMessage in docs

We always write:

http.createServer(function(req, res) {
req.on('data', function(){})
.on('end', function(){});

But the problems is: I can't find any breath of
Event: data
Event: end
Class: http.IncomingMessage
in https://nodejs.org/dist/latest-v6.x/docs/api/http.html

Please tell me why.


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'.