Skip to content

Commit

Permalink
doc: clarify http.get data consumption requirement
Browse files Browse the repository at this point in the history
With the previous wording, I read this sentence as meaning, "you
_must_ use the http.get callback mechanism and cannot register a
listener on the returned http.ClientRequest object." This is obviously
not the intention, so adjust the sentence to make this clearer.
  • Loading branch information
strugee committed Aug 26, 2017
1 parent f912080 commit ec694a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1693,8 +1693,8 @@ changes:
Since most requests are GET requests without bodies, Node.js provides this
convenience method. The only difference between this method and
[`http.request()`][] is that it sets the method to GET and calls `req.end()`
automatically. Note that response data must be consumed in the callback
for reasons stated in [`http.ClientRequest`][] section.
automatically. Note that the callback must take care to consume the response
data for reasons stated in [`http.ClientRequest`][] section.

The `callback` is invoked with a single argument that is an instance of
[`http.IncomingMessage`][]
Expand Down

0 comments on commit ec694a8

Please sign in to comment.