@@ -34,7 +34,7 @@ Example:
3434## https.request(options, callback)
3535
3636Makes a request to a secure web server.
37- All options from [ ` http.request() ` ] ( http.html#http.request ) are valid.
37+ All options from [ http.request()] ( http.html#http.request ) are valid.
3838
3939Example:
4040
@@ -68,12 +68,30 @@ The options argument has the following options
6868- path: Path to request. Default ` '/' ` .
6969- method: HTTP request method. Default ` 'GET' ` .
7070
71- The following options can also be specified.
72- However, a global [ Agent] ( http.html#http.Agent ) cannot be used.
73-
74- - key: Private key to use for SSL. Default ` null ` .
75- - cert: Public x509 certificate to use. Default ` null ` .
76- - ca: An authority certificate or array of authority certificates to check
71+ - ` host ` : A domain name or IP address of the server to issue the request to.
72+ Defaults to ` 'localhost' ` .
73+ - ` hostname ` : To support ` url.parse() ` ` hostname ` is prefered over ` host `
74+ - ` port ` : Port of remote server. Defaults to 443.
75+ - ` method ` : A string specifying the HTTP request method. Defaults to ` 'GET' ` .
76+ - ` path ` : Request path. Defaults to ` '/' ` . Should include query string if any.
77+ E.G. ` '/index.html?page=12' `
78+ - ` headers ` : An object containing request headers.
79+ - ` auth ` : Basic authentication i.e. ` 'user:password' ` to compute an
80+ Authorization header.
81+ - ` agent ` : Controls [ Agent] ( #https.Agent ) behavior. When an Agent is
82+ used request will default to ` Connection: keep-alive ` . Possible values:
83+ - ` undefined ` (default): use [ globalAgent] ( #https.globalAgent ) for this
84+ host and port.
85+ - ` Agent ` object: explicitly use the passed in ` Agent ` .
86+ - ` false ` : opts out of connection pooling with an Agent, defaults request to
87+ ` Connection: close ` .
88+
89+ The following options from [ tls.connect()] ( tls.html#tls.connect ) can also be
90+ specified. However, a [ globalAgent] ( #https.globalAgent ) silently ignores these.
91+
92+ - ` key ` : Private key to use for SSL. Default ` null ` .
93+ - ` cert ` : Public x509 certificate to use. Default ` null ` .
94+ - ` ca ` : An authority certificate or array of authority certificates to check
7795 the remote host against.
7896
7997In order to specify these options, use a custom ` Agent ` .
@@ -133,5 +151,13 @@ Example:
133151 });
134152
135153
154+ ## https.Agent
155+
156+ An Agent object for HTTPS similer to [ http.Agent] ( http.html#http.Agent ) .
157+ See [ https.request()] ( #https.request ) for more information.
158+
136159
160+ ## https.globalAgent
137161
162+ Global instance of [ https.Agent] ( #https.Agent ) which is used as the default
163+ for all HTTPS client requests.
0 commit comments