Skip to content

Commit 13332f6

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 e7e1b2a commit 13332f6

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
@@ -1695,8 +1695,8 @@ changes:
16951695
Since most requests are GET requests without bodies, Node.js provides this
16961696
convenience method. The only difference between this method and
16971697
[`http.request()`][] is that it sets the method to GET and calls `req.end()`
1698-
automatically. Note that response data must be consumed in the callback
1699-
for reasons stated in [`http.ClientRequest`][] section.
1698+
automatically. Note that the callback must take care to consume the response
1699+
data for reasons stated in [`http.ClientRequest`][] section.
17001700

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

0 commit comments

Comments
 (0)