@@ -1963,44 +1963,44 @@ changes:
19631963
19641964* ` url ` {string | URL}
19651965* ` options ` {Object}
1966- * ` protocol ` {string} Protocol to use. ** Default:** ` 'http:' ` .
1966+ * ` agent ` {http.Agent | boolean} Controls [ ` Agent ` ] [ ] behavior. Possible
1967+ values:
1968+ * ` undefined ` (default): use [ ` http.globalAgent ` ] [ ] for this host and port.
1969+ * ` Agent ` object: explicitly use the passed in ` Agent ` .
1970+ * ` false ` : causes a new ` Agent ` with default values to be used.
1971+ * ` auth ` {string} Basic authentication i.e. ` 'user:password' ` to compute an
1972+ Authorization header.
1973+ * ` createConnection ` {Function} A function that produces a socket/stream to
1974+ use for the request when the ` agent ` option is not used. This can be used to
1975+ avoid creating a custom ` Agent ` class just to override the default
1976+ ` createConnection ` function. See [ ` agent.createConnection() ` ] [ ] for more
1977+ details. Any [ ` Duplex ` ] [ ] stream is a valid return value.
1978+ * ` defaultPort ` {number} Default port for the protocol. ** Default:**
1979+ ` agent.defaultPort ` if an ` Agent ` is used, else ` undefined ` .
1980+ * ` family ` {number} IP address family to use when resolving ` host ` or
1981+ ` hostname ` . Valid values are ` 4 ` or ` 6 ` . When unspecified, both IP v4 and
1982+ v6 will be used.
1983+ * ` headers ` {Object} An object containing request headers.
19671984 * ` host ` {string} A domain name or IP address of the server to issue the
19681985 request to. ** Default:** ` 'localhost' ` .
19691986 * ` hostname ` {string} Alias for ` host ` . To support [ ` url.parse() ` ] [ ] ,
19701987 ` hostname ` will be used if both ` host ` and ` hostname ` are specified.
1971- * ` family ` {number} IP address family to use when resolving ` host ` or
1972- ` hostname ` . Valid values are ` 4 ` or ` 6 ` . When unspecified, both IP v4 and
1973- v6 will be used.
1974- * ` defaultPort ` {number} Default port for the protocol. ** Default:**
1975- ` agent.defaultPort ` if an ` Agent ` is used, else ` undefined ` .
1976- * ` port ` {number} Port of remote server. ** Default:** ` defaultPort ` if set,
1977- else ` 80 ` .
19781988 * ` localAddress ` {string} Local interface to bind for network connections.
1979- * ` socketPath ` {string} Unix Domain Socket (cannot be used if one of ` host `
1980- or ` port ` is specified, those specify a TCP Socket).
19811989 * ` method ` {string} A string specifying the HTTP request method. ** Default:**
19821990 ` 'GET' ` .
19831991 * ` path ` {string} Request path. Should include query string if any.
19841992 E.G. ` '/index.html?page=12' ` . An exception is thrown when the request path
19851993 contains illegal characters. Currently, only spaces are rejected but that
19861994 may change in the future. ** Default:** ` '/' ` .
1987- * ` headers ` {Object} An object containing request headers.
1988- * ` auth ` {string} Basic authentication i.e. ` 'user:password' ` to compute an
1989- Authorization header.
1990- * ` agent ` {http.Agent | boolean} Controls [ ` Agent ` ] [ ] behavior. Possible
1991- values:
1992- * ` undefined ` (default): use [ ` http.globalAgent ` ] [ ] for this host and port.
1993- * ` Agent ` object: explicitly use the passed in ` Agent ` .
1994- * ` false ` : causes a new ` Agent ` with default values to be used.
1995- * ` createConnection ` {Function} A function that produces a socket/stream to
1996- use for the request when the ` agent ` option is not used. This can be used to
1997- avoid creating a custom ` Agent ` class just to override the default
1998- ` createConnection ` function. See [ ` agent.createConnection() ` ] [ ] for more
1999- details. Any [ ` Duplex ` ] [ ] stream is a valid return value.
2000- * ` timeout ` {number}: A number specifying the socket timeout in milliseconds.
2001- This will set the timeout before the socket is connected.
1995+ * ` port ` {number} Port of remote server. ** Default:** ` defaultPort ` if set,
1996+ else ` 80 ` .
1997+ * ` protocol ` {string} Protocol to use. ** Default:** ` 'http:' ` .
20021998 * ` setHost ` {boolean}: Specifies whether or not to automatically add the
20031999 ` Host ` header. Defaults to ` true ` .
2000+ * ` socketPath ` {string} Unix Domain Socket (cannot be used if one of ` host `
2001+ or ` port ` is specified, those specify a TCP Socket).
2002+ * ` timeout ` {number}: A number specifying the socket timeout in milliseconds.
2003+ This will set the timeout before the socket is connected.
20042004* ` callback ` {Function}
20052005* Returns: {http.ClientRequest}
20062006
0 commit comments