Skip to content

Commit 5696223

Browse files
strugeeMylesBorins
authored andcommitted
doc: clarify http.get data consumption requirement
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. PR-URL: #15049 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent e014178 commit 5696223

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/http.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,8 @@ added: v0.3.6
14761476
Since most requests are GET requests without bodies, Node.js provides this
14771477
convenience method. The only difference between this method and
14781478
[`http.request()`][] is that it sets the method to GET and calls `req.end()`
1479-
automatically. Note that response data must be consumed in the callback
1480-
for reasons stated in [`http.ClientRequest`][] section.
1479+
automatically. Note that the callback must take care to consume the response
1480+
data for reasons stated in [`http.ClientRequest`][] section.
14811481

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

0 commit comments

Comments
 (0)