File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ changes:
273
273
* ` port ` ** Default:** ` 443 `
274
274
* ` agent ` ** Default:** ` https.globalAgent `
275
275
* ` callback ` {Function}
276
+ * Returns: {http.ClientRequest}
276
277
277
278
Makes a request to a secure web server.
278
279
@@ -286,6 +287,10 @@ The following additional `options` from [`tls.connect()`][] are also accepted:
286
287
string, it is automatically parsed with [ ` new URL() ` ] [ ] . If it is a [ ` URL ` ] [ ]
287
288
object, it will be automatically converted to an ordinary ` options ` object.
288
289
290
+ ` https.request() ` returns an instance of the [ ` http.ClientRequest ` ] [ ]
291
+ class. The ` ClientRequest ` instance is a writable stream. If one needs to
292
+ upload a file with a POST request, then write to the ` ClientRequest ` object.
293
+
289
294
``` js
290
295
const https = require (' https' );
291
296
@@ -456,6 +461,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
456
461
[ `URL` ] : url.md#url_the_whatwg_url_api
457
462
[ `http.Agent(options)` ] : http.md#http_new_agent_options
458
463
[ `http.Agent` ] : http.md#http_class_http_agent
464
+ [ `http.ClientRequest` ] : http.md#http_class_http_clientrequest
459
465
[ `http.Server#headersTimeout` ] : http.md#http_server_headerstimeout
460
466
[ `http.Server#keepAliveTimeout` ] : http.md#http_server_keepalivetimeout
461
467
[ `http.Server#maxHeadersCount` ] : http.md#http_server_maxheaderscount
You can’t perform that action at this time.
0 commit comments