mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: fix ambiguity in http.md and https.md
PR-URL: https://github.com/nodejs/node/pull/48692 Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
@@ -3351,14 +3351,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.
|
||||
|
||||
|
||||
@@ -296,7 +296,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.
|
||||
|
||||
Reference in New Issue
Block a user