@@ -1511,34 +1511,37 @@ added: v0.3.6
1511
1511
1512
1512
* ` options ` {Object}
1513
1513
* ` protocol ` {String} Protocol to use. Defaults to ` 'http:' ` .
1514
- * ` host ` {String} A domain name or IP address of the server to issue the request to.
1515
- Defaults to ` 'localhost' ` .
1516
- * ` hostname ` {String} Alias for ` host ` . To support [ ` url.parse() ` ] [ ] ` hostname ` is
1517
- preferred over ` host ` .
1518
- * ` family ` {Number} IP address family to use when resolving ` host ` and ` hostname ` .
1519
- Valid values are ` 4 ` or ` 6 ` . When unspecified, both IP v4 and v6 will be
1520
- used.
1514
+ * ` host ` {String} A domain name or IP address of the server to issue the
1515
+ request to. Defaults to ` 'localhost' ` .
1516
+ * ` hostname ` {String} Alias for ` host ` . To support [ ` url.parse() ` ] [ ] ,
1517
+ ` hostname ` is preferred over ` host ` .
1518
+ * ` family ` {Number} IP address family to use when resolving ` host ` and
1519
+ ` hostname ` . Valid values are ` 4 ` or ` 6 ` . When unspecified, both IP v4 and
1520
+ v6 will be used.
1521
1521
* ` port ` {Number} Port of remote server. Defaults to 80.
1522
1522
* ` localAddress ` {String} Local interface to bind for network connections.
1523
- * ` socketPath ` {String} Unix Domain Socket (use one of host: port or socketPath).
1524
- * ` method ` {String} A string specifying the HTTP request method. Defaults to ` 'GET' ` .
1525
- * ` path ` {String} Request path. Defaults to ` '/' ` . Should include query string if any.
1526
- E.G. ` '/index.html?page=12' ` . An exception is thrown when the request path
1527
- contains illegal characters. Currently, only spaces are rejected but that
1528
- may change in the future.
1523
+ * ` socketPath ` {String} Unix Domain Socket (use one of host: port or
1524
+ socketPath).
1525
+ * ` method ` {String} A string specifying the HTTP request method. Defaults to
1526
+ ` 'GET' ` .
1527
+ * ` path ` {String} Request path. Defaults to ` '/' ` . Should include query
1528
+ string if any. E.G. ` '/index.html?page=12' ` . An exception is thrown when
1529
+ the request path contains illegal characters. Currently, only spaces are
1530
+ rejected but that may change in the future.
1529
1531
* ` headers ` {Object} An object containing request headers.
1530
1532
* ` auth ` {String} Basic authentication i.e. ` 'user:password' ` to compute an
1531
1533
Authorization header.
1532
- * ` agent ` {http.Agent|Boolean} Controls [ ` Agent ` ] [ ] behavior. When an Agent is used request will
1533
- default to ` Connection: keep-alive ` . Possible values:
1534
+ * ` agent ` {http.Agent|Boolean} Controls [ ` Agent ` ] [ ] behavior. When an Agent
1535
+ is used request will default to ` Connection: keep-alive ` . Possible values:
1534
1536
* ` undefined ` (default): use [ ` http.globalAgent ` ] [ ] for this host and port.
1535
1537
* ` Agent ` object: explicitly use the passed in ` Agent ` .
1536
1538
* ` false ` : opts out of connection pooling with an Agent, defaults request to
1537
1539
` Connection: close ` .
1538
- * ` createConnection ` {Function} A function that produces a socket/stream to use for the
1539
- request when the ` agent ` option is not used. This can be used to avoid
1540
- creating a custom Agent class just to override the default ` createConnection `
1541
- function. See [ ` agent.createConnection() ` ] [ ] for more details.
1540
+ * ` createConnection ` {Function} A function that produces a socket/stream to
1541
+ use for the request when the ` agent ` option is not used. This can be used to
1542
+ avoid creating a custom Agent class just to override the default
1543
+ ` createConnection ` function. See [ ` agent.createConnection() ` ] [ ] for more
1544
+ details.
1542
1545
* ` timeout ` {Integer}: A number specifying the socket timeout in milliseconds.
1543
1546
This will set the timeout before the socket is connected.
1544
1547
* ` callback ` {Function}
0 commit comments