From a459f657b10463a664e0f8c36edea17db04396f5 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Sun, 6 May 2018 00:31:03 +0530 Subject: [PATCH 1/2] 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 --- doc/api/http2.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 566cdc065e171d..bb3792fcdc2f20 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -232,10 +232,12 @@ 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 name value pairs + +The `'stream'` event is emitted when a new `Http2Stream` is created. ```js const http2 = require('http2'); From b0a31f1c47de1029d41cff1f098c7764b621df26 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Mon, 7 May 2018 22:49:50 +0530 Subject: [PATCH 2/2] fixup! doc: add parameters for Http2Session:stream event --- doc/api/http2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index bb3792fcdc2f20..a8f762173404f1 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -235,7 +235,8 @@ added: v8.4.0 * `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 name value pairs +* `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.