Skip to content

Commit 3014dfd

Browse files
TimothyGuaddaleax
authored andcommitted
doc: wrap long lines in http.request
PR-URL: #9584 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 89216a4 commit 3014dfd

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

doc/api/http.md

+22-19
Original file line numberDiff line numberDiff line change
@@ -1500,34 +1500,37 @@ added: v0.3.6
15001500

15011501
* `options` {Object}
15021502
* `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.
15101510
* `port` {Number} Port of remote server. Defaults to 80.
15111511
* `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.
15181520
* `headers` {Object} An object containing request headers.
15191521
* `auth` {String} Basic authentication i.e. `'user:password'` to compute an
15201522
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:
15231525
* `undefined` (default): use [`http.globalAgent`][] for this host and port.
15241526
* `Agent` object: explicitly use the passed in `Agent`.
15251527
* `false`: opts out of connection pooling with an Agent, defaults request to
15261528
`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.
15311534
* `timeout` {Integer}: A number specifying the socket timeout in milliseconds.
15321535
This will set the timeout before the socket is connected.
15331536
* `callback` {Function}

0 commit comments

Comments
 (0)