From 29ccf6e14b10e20f2eb766015fcfbcb9fa349c72 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 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 566cdc065e1..a8f76217340 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');