From: Ryan Dahl Date: Fri, 30 Apr 2010 17:33:56 +0000 (-0700) Subject: Fix some styling in the docs X-Git-Tag: v0.1.94~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=285c5ed36fe60731a244fe0de12e76c91753cb34;p=platform%2Fupstream%2Fnodejs.git Fix some styling in the docs --- diff --git a/doc/api.markdown b/doc/api.markdown index 28ec65f..254b6f8 100644 --- a/doc/api.markdown +++ b/doc/api.markdown @@ -1642,7 +1642,10 @@ the user--and passed as the first argument to a `'request'` listener. This is an EventEmitter with the following events: -- **`'data'`** - `callback(chunk)`: +### Event: 'data' + +`function (chunk) { }` + Emitted when a piece of the message body is received. Example: A chunk of the body is given as the single @@ -1650,7 +1653,10 @@ argument. The transfer-encoding has been decoded. The body chunk is a string. The body encoding is set with `request.setBodyEncoding()`. -- **`'end'`** - `callback()`: +### Event: 'end' + +`function () { }` + Emitted exactly once for each message. No arguments. After emitted no other events will be emitted on the request. @@ -1870,7 +1876,10 @@ event, the entire body will be caught. This is a writable stream. This is an `EventEmitter` with the following events: -- **`'response'`** - `callback(response)`: +### Event 'response' + +`function (response) { }` + Emitted when a response is received to this request. This event is emitted only once. The `response` argument will be an instance of `http.ClientResponse`.