Skip to content

Commit

Permalink
doc: add parameters for Http2Session:stream event
Browse files Browse the repository at this point in the history
Add parameters for the callback for the Http2Session:stream event
inline with the pattern in the rest of the documentation.

Refs: nodejs/help#877 (comment)

Backport-PR-URL: #22850
PR-URL: #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>
  • Loading branch information
ryzokuken authored and BethGriggs committed Oct 16, 2018
1 parent 395ce84 commit 448922d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions doc/api/http2.md
Expand Up @@ -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');
Expand Down

0 comments on commit 448922d

Please sign in to comment.