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