summaryrefslogtreecommitdiff
path: root/test/parallel/test-http2-sent-headers.js
AgeCommit message (Collapse)Author
2018-04-16http2: refactor how trailers are doneJames M Snell
Rather than an option, introduce a method and an event... ```js server.on('stream', (stream) => { stream.respond(undefined, { waitForTrailers: true }); stream.on('wantTrailers', () => { stream.sendTrailers({ abc: 'xyz'}); }); stream.end('hello world'); }); ``` This is a breaking change in the API such that the prior `options.getTrailers` is no longer supported at all. Ordinarily this would be semver-major and require a deprecation but the http2 stuff is still experimental. PR-URL: https://github.com/nodejs/node/pull/19959 Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-11http2: remember sent headersJames M Snell
Add sentHeaders, sentTrailers, and sentInfoHeaders properties on `Http2Stream`. PR-URL: https://github.com/nodejs/node/pull/18045 Fixes: https://github.com/nodejs/node/issues/16619 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>