From 42ecd46d1f0a543e626793315c48c4993a63db22 Mon Sep 17 00:00:00 2001 From: an5er <1318861442@qq.com> Date: Sat, 8 Jul 2023 17:25:27 +0800 Subject: [PATCH] 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 Reviewed-By: Marco Ippolito Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Matteo Collina --- doc/api/http.md | 5 ++--- doc/api/https.md | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 87e9cffa0407a0..10909e8ebaa913 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -3297,14 +3297,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. diff --git a/doc/api/https.md b/doc/api/https.md index 07237f7d73ebab..ab9a0ef3695faf 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -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.