summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2018-05-06 00:31:03 +0530
committerUjjwal Sharma <usharma1998@gmail.com>2018-05-07 23:45:34 +0530
commit29ccf6e14b10e20f2eb766015fcfbcb9fa349c72 (patch)
tree1665655852e8f526b78acbb102c01067374c5f63 /doc
parent90e8f79f652b02a8fdf6f72e273cc81429a9376a (diff)
downloadnode-new-29ccf6e14b10e20f2eb766015fcfbcb9fa349c72.tar.gz
doc: add parameters for Http2Session:stream event
Add parameters for the callback for the Http2Session:stream event inline with the pattern in the rest of the documentation. Refs: https://github.com/nodejs/help/issues/877#issuecomment-381253464 PR-URL: https://github.com/nodejs/node/pull/20547 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/http2.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md
index 566cdc065e..a8f7621734 100644
--- a/doc/api/http2.md
+++ b/doc/api/http2.md
@@ -232,10 +232,13 @@ session.on('remoteSettings', (settings) => {
added: v8.4.0
-->
-The `'stream'` event is emitted when a new `Http2Stream` is created. When
-invoked, the handler function will receive a reference to the `Http2Stream`
-object, a [HTTP/2 Headers Object][], and numeric flags associated with the
-creation of the stream.
+* `stream` {Http2Stream} A reference to the stream
+* `headers` {HTTP/2 Headers Object} An object describing the headers
+* `flags` {number} The associated numeric flags
+* `rawHeaders` {Array} An array containing the raw header names followed by
+ their respective values.
+
+The `'stream'` event is emitted when a new `Http2Stream` is created.
```js
const http2 = require('http2');