diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-02 08:38:48 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-04 13:45:39 +0300 |
commit | de0053cc3280bdf72c9010f383290f79120a1e98 (patch) | |
tree | 493fc9bd84c3d8e97342202d0a840b4fe29bdd6e /doc/api/http2.md | |
parent | 237cbe10fb82ba6ec69b14193a4a970e184306e7 (diff) | |
download | android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.tar.gz android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.tar.bz2 android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.zip |
doc: fix various nits
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md.
* Space infix operators.
* Unify quotes in inline code spans (use only single quotes).
* Unify `* Returns:` (eliminate deviations).
* Dedupe spaces.
PR-URL: https://github.com/nodejs/node/pull/19743
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/http2.md')
-rw-r--r-- | doc/api/http2.md | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md index 7eea50faa1..094dca2582 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1439,7 +1439,7 @@ added: v8.4.0 * Extends: {net.Server} In `Http2Server`, there are no `'clientError'` events as there are in -HTTP1. However, there are `'sessionError'`, and `'streamError'` events for +HTTP1. However, there are `'sessionError'`, and `'streamError'` events for errors emitted on the socket, or from `Http2Session` or `Http2Stream` instances. #### Event: 'checkContinue' @@ -1823,7 +1823,7 @@ changes: * ...: Any [`tls.createServer()`][] options can be provided. For servers, the identity options (`pfx` or `key`/`cert`) are usually required. * `onRequestHandler` {Function} See [Compatibility API][] -* Returns {Http2SecureServer} +* Returns: {Http2SecureServer} Returns a `tls.Server` instance that creates and manages `Http2Session` instances. @@ -1921,7 +1921,7 @@ changes: [`Duplex`][] stream that is to be used as the connection for this session. * ...: Any [`net.connect()`][] or [`tls.connect()`][] options can be provided. * `listener` {Function} -* Returns {ClientHttp2Session} +* Returns: {ClientHttp2Session} Returns a `ClientHttp2Session` instance. @@ -2417,8 +2417,8 @@ added: v8.4.0 The raw request/response headers list exactly as they were received. -Note that the keys and values are in the same list. It is *not* a -list of tuples. So, the even-numbered offsets are key values, and the +Note that the keys and values are in the same list. It is *not* a +list of tuples. So, the even-numbered offsets are key values, and the odd-numbered offsets are the associated values. Header names are not lowercased, and duplicates are not merged. @@ -2445,7 +2445,7 @@ added: v8.4.0 * {Array} The raw request/response trailer keys and values exactly as they were -received. Only populated at the `'end'` event. +received. Only populated at the `'end'` event. #### request.setTimeout(msecs, callback) <!-- YAML @@ -2455,7 +2455,7 @@ added: v8.4.0 * `msecs` {number} * `callback` {Function} -Sets the [`Http2Stream`]()'s timeout value to `msecs`. If a callback is +Sets the [`Http2Stream`]()'s timeout value to `msecs`. If a callback is provided, then it is added as a listener on the `'timeout'` event on the response object. @@ -2534,7 +2534,7 @@ Then `request.url` will be: ``` To parse the url into its parts `require('url').parse(request.url)` -can be used. Example: +can be used. Example: ```txt $ node @@ -2582,7 +2582,7 @@ Url { added: v8.4.0 --> -This object is created internally by an HTTP server--not by the user. It is +This object is created internally by an HTTP server — not by the user. It is passed as the second parameter to the [`'request'`][] event. The response implements, but does not inherit from, the [Writable Stream][] @@ -2791,8 +2791,8 @@ added: v8.4.0 * `name` {string} * `value` {string|string[]} -Sets a single header value for implicit headers. If this header already exists -in the to-be-sent headers, its value will be replaced. Use an array of strings +Sets a single header value for implicit headers. If this header already exists +in the to-be-sent headers, its value will be replaced. Use an array of strings here to send multiple headers with the same name. Example: @@ -2832,7 +2832,7 @@ added: v8.4.0 * `msecs` {number} * `callback` {Function} -Sets the [`Http2Stream`]()'s timeout value to `msecs`. If a callback is +Sets the [`Http2Stream`]()'s timeout value to `msecs`. If a callback is provided, then it is added as a listener on the `'timeout'` event on the response object. @@ -2991,7 +2991,7 @@ response.writeHead(200, { ``` Note that Content-Length is given in bytes not characters. The -`Buffer.byteLength()` API may be used to determine the number of bytes in a +`Buffer.byteLength()` API may be used to determine the number of bytes in a given encoding. On outbound messages, Node.js does not check if Content-Length and the length of the body being transmitted are equal or not. However, when receiving messages, Node.js will automatically reject messages when the |