Skip to content

Commit

Permalink
http: document edge case in http request
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed May 26, 2019
1 parent f8f9601 commit 56ae77a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -2061,8 +2061,13 @@ order:
(`'data'` will not be emitted at all if the response body is empty, for
instance, in most redirects)
* `'end'` on the `res` object
* `'error'` if the server response is received while still writing to request.
* `'close'`

Note that `response` can be emitted even before the client request has
been ended (`end()`). If the client is still writing after `response` an
`ECONNRESET` error might also be emitted.

In the case of a connection error, the following events will be emitted:

* `'socket'`
Expand Down

0 comments on commit 56ae77a

Please sign in to comment.