Skip to content

Commit

Permalink
doc: fix ambiguity in http.md and https.md
Browse files Browse the repository at this point in the history
PR-URL: #48692
Fixes: #48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
an5er authored and ruyadorno committed Sep 12, 2023
1 parent e1098dd commit 72a7fcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -3308,14 +3308,13 @@ changes:

* `url` {string | URL}
* `options` {Object} Accepts the same `options` as
[`http.request()`][], with the `method` always set to `GET`.
Properties that are inherited from the prototype are ignored.
[`http.request()`][], with the method set to GET by default.
* `callback` {Function}
* Returns: {http.ClientRequest}

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()`
[`http.request()`][] is that it sets the method to GET by default and calls `req.end()`
automatically. The callback must take care to consume the response
data for reasons stated in [`http.ClientRequest`][] section.

Expand Down
2 changes: 1 addition & 1 deletion doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ changes:

* `url` {string | URL}
* `options` {Object | string | URL} Accepts the same `options` as
[`https.request()`][], with the `method` always set to `GET`.
[`https.request()`][], with the method set to GET by default.
* `callback` {Function}

Like [`http.get()`][] but for HTTPS.
Expand Down

0 comments on commit 72a7fcc

Please sign in to comment.