Browse Source

Fix some styling in the docs

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
285c5ed36f
  1. 15
      doc/api.markdown

15
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: 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. Emitted when a piece of the message body is received.
Example: A chunk of the body is given as the single 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 body chunk is a string. The body encoding is set with
`request.setBodyEncoding()`. `request.setBodyEncoding()`.
- **`'end'`** - `callback()`: ### Event: 'end'
`function () { }`
Emitted exactly once for each message. No arguments. After Emitted exactly once for each message. No arguments. After
emitted no other events will be emitted on the request. 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 a writable stream.
This is an `EventEmitter` with the following events: 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 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`. `response` argument will be an instance of `http.ClientResponse`.

Loading…
Cancel
Save