Skip to content

Commit c1bb7b4

Browse files
committed
doc[http2]: update push and trailers event with rawHeaders param
Signed-off-by: Yu-Sheng Chen <samuel871211@gmail.com>
1 parent 78bbee3 commit c1bb7b4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

doc/api/http2.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,10 +1341,11 @@ added: v8.4.0
13411341

13421342
* `headers` {HTTP/2 Headers Object} An object describing the headers
13431343
* `flags` {number} The associated numeric flags
1344+
* `rawHeaders` {HTTP/2 Raw Headers}
13441345

13451346
The `'trailers'` event is emitted when a block of headers associated with
1346-
trailing header fields is received. The listener callback is passed the
1347-
[HTTP/2 Headers Object][] and flags associated with the headers.
1347+
trailing header fields is received. The listener callback is passed the [HTTP/2 Headers Object][], flags associated
1348+
with the headers, and the headers in raw format (see [HTTP/2 Raw Headers][]).
13481349

13491350
This event might not be emitted if `http2stream.end()` is called
13501351
before trailers are received and the incoming data is not being read or
@@ -1704,10 +1705,11 @@ added: v8.4.0
17041705

17051706
* `headers` {HTTP/2 Headers Object}
17061707
* `flags` {number}
1708+
* `rawHeaders` {HTTP/2 Raw Headers}
17071709

17081710
The `'push'` event is emitted when response headers for a Server Push stream
1709-
are received. The listener callback is passed the [HTTP/2 Headers Object][] and
1710-
flags associated with the headers.
1711+
are received. The listener callback is passed the [HTTP/2 Headers Object][], flags associated
1712+
with the headers, and the headers in raw format (see [HTTP/2 Raw Headers][]).
17111713

17121714
```js
17131715
stream.on('push', (headers, flags) => {

0 commit comments

Comments
 (0)