From 448922d0debaf71134665966bb6d6a427e1b4f08 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Sun, 6 May 2018 00:31:03 +0530 Subject: [PATCH] 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 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20547 Reviewed-By: Anna Henningsen Reviewed-By: Vse Mozhet Byt Reviewed-By: Matteo Collina Reviewed-By: Trivikram Kamat --- doc/api/http2.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index c2fa1de02288a7..0db1e044cac2e4 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -233,10 +233,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');