Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: clarify http 'data' callback
Fixes #2733.
  • Loading branch information
bnoordhuis committed Feb 10, 2012
1 parent 38eec57 commit a8f3576
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions doc/api/http.markdown
Expand Up @@ -135,12 +135,9 @@ interface. This is an `EventEmitter` with the following events:

`function (chunk) { }`

Emitted when a piece of the message body is received.

Example: A chunk of the body is given as the single
argument. The transfer-encoding has been decoded. The
body chunk is a string. The body encoding is set with
`request.setEncoding()`.
Emitted when a piece of the message body is received. The chunk is a string if
an encoding has been set with `request.setEncoding()`, otherwise it's a
[Buffer](buffers.html).

Note that the __data will be lost__ if there is no listener when a
`ServerRequest` emits a `'data'` event.
Expand Down

0 comments on commit a8f3576

Please sign in to comment.