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)

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 MylesBorins committed May 9, 2018
1 parent 578e054 commit 0e88051
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 0e88051

Please sign in to comment.