Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add arguments for stream event of Http2Server and Http2SecureServer #37892

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1815,9 +1815,17 @@ an `Http2Session` object associated with the `Http2Server`.
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 names followed by
their respective values.

The `'stream'` event is emitted when a `'stream'` event has been emitted by
an `Http2Session` associated with the server.

See also [`Http2Session`'s `stream` event][].
jasnell marked this conversation as resolved.
Show resolved Hide resolved

```js
const http2 = require('http2');
const {
Expand Down Expand Up @@ -2003,9 +2011,17 @@ an `Http2Session` object associated with the `Http2SecureServer`.
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 names followed by
their respective values.

The `'stream'` event is emitted when a `'stream'` event has been emitted by
an `Http2Session` associated with the server.

See also [`Http2Session`'s `stream` event][].
jasnell marked this conversation as resolved.
Show resolved Hide resolved

```js
const http2 = require('http2');
const {
Expand Down Expand Up @@ -3838,6 +3854,7 @@ you need to implement any fall-back behaviour yourself.
[`Http2ServerRequest`]: #http2_class_http2_http2serverrequest
[`Http2ServerResponse`]: #http2_class_http2_http2serverresponse
[`Http2Session` and Sockets]: #http2_http2session_and_sockets
[`Http2Session`'s `stream` event]: #http2_event_stream
jasnell marked this conversation as resolved.
Show resolved Hide resolved
[`Http2Stream`]: #http2_class_http2stream
[`ServerHttp2Stream`]: #http2_class_serverhttp2stream
[`TypeError`]: errors.md#errors_class_typeerror
Expand Down