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 parameters for Http2Session:stream event #20547

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions doc/api/http2.md
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually supposed to be public? @nodejs/http2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what is the convention here, but maybe name value -> name-value or name/value or name:value (with or without spaces, I am not sure as well)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's correct. rawHeaders is exposed as request.rawHeaders.

Copy link
Contributor Author

@ryzokuken ryzokuken May 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vsemozhetbyt I think it could be either depending on the key:value delimiter? Let me check what the delimiter is in this particular case.


The `'stream'` event is emitted when a new `Http2Stream` is created.

```js
const http2 = require('http2');
Expand Down