From 4d55d1611db3241c8bfb177189373e4e2c928788 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 13 Nov 2016 06:43:55 -0800 Subject: [PATCH] doc: wrap long lines in http.request PR-URL: https://github.com/nodejs/node/pull/9584 Reviewed-By: Luigi Pinca Reviewed-By: Roman Reiss --- doc/api/http.md | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index ea6c04604df333..fb90123330458c 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1500,34 +1500,37 @@ added: v0.3.6 * `options` {Object} * `protocol` {String} Protocol to use. Defaults to `'http:'`. - * `host` {String} A domain name or IP address of the server to issue the request to. - Defaults to `'localhost'`. - * `hostname` {String} Alias for `host`. To support [`url.parse()`][] `hostname` is - preferred over `host`. - * `family` {Number} IP address family to use when resolving `host` and `hostname`. - Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be - used. + * `host` {String} A domain name or IP address of the server to issue the + request to. Defaults to `'localhost'`. + * `hostname` {String} Alias for `host`. To support [`url.parse()`][], + `hostname` is preferred over `host`. + * `family` {Number} IP address family to use when resolving `host` and + `hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and + v6 will be used. * `port` {Number} Port of remote server. Defaults to 80. * `localAddress` {String} Local interface to bind for network connections. - * `socketPath` {String} Unix Domain Socket (use one of host:port or socketPath). - * `method` {String} A string specifying the HTTP request method. Defaults to `'GET'`. - * `path` {String} Request path. Defaults to `'/'`. Should include query string if any. - E.G. `'/index.html?page=12'`. An exception is thrown when the request path - contains illegal characters. Currently, only spaces are rejected but that - may change in the future. + * `socketPath` {String} Unix Domain Socket (use one of host:port or + socketPath). + * `method` {String} A string specifying the HTTP request method. Defaults to + `'GET'`. + * `path` {String} Request path. Defaults to `'/'`. Should include query + string if any. E.G. `'/index.html?page=12'`. An exception is thrown when + the request path contains illegal characters. Currently, only spaces are + rejected but that may change in the future. * `headers` {Object} An object containing request headers. * `auth` {String} Basic authentication i.e. `'user:password'` to compute an Authorization header. - * `agent` {http.Agent|Boolean} Controls [`Agent`][] behavior. When an Agent is used request will - default to `Connection: keep-alive`. Possible values: + * `agent` {http.Agent|Boolean} Controls [`Agent`][] behavior. When an Agent + is used request will default to `Connection: keep-alive`. Possible values: * `undefined` (default): use [`http.globalAgent`][] for this host and port. * `Agent` object: explicitly use the passed in `Agent`. * `false`: opts out of connection pooling with an Agent, defaults request to `Connection: close`. - * `createConnection` {Function} A function that produces a socket/stream to use for the - request when the `agent` option is not used. This can be used to avoid - creating a custom Agent class just to override the default `createConnection` - function. See [`agent.createConnection()`][] for more details. + * `createConnection` {Function} A function that produces a socket/stream to + use for the request when the `agent` option is not used. This can be used to + avoid creating a custom Agent class just to override the default + `createConnection` function. See [`agent.createConnection()`][] for more + details. * `timeout` {Integer}: A number specifying the socket timeout in milliseconds. This will set the timeout before the socket is connected. * `callback` {Function}