0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
nodejs/lib/http2.js
Pini Houri 3f5d944ace http2: Expose Http2ServerRequest/Response
In order for express (and possibly other libraries) to get and use
the Http2ServerRequest/Response - expose them in the http2 exports.
Same as is done in http module.

PR-URL: https://github.com/nodejs/node/pull/14690
Ref: https://github.com/expressjs/express/issues/3390
Fixes: https://github.com/nodejs/node/issues/14672
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-16 12:58:59 +03:00

32 lines
575 B
JavaScript

'use strict';
process.emitWarning(
'The http2 module is an experimental API.',
'ExperimentalWarning', undefined,
'See https://github.com/nodejs/http2'
);
const {
constants,
getDefaultSettings,
getPackedSettings,
getUnpackedSettings,
createServer,
createSecureServer,
connect,
Http2ServerRequest,
Http2ServerResponse,
} = require('internal/http2/core');
module.exports = {
constants,
getDefaultSettings,
getPackedSettings,
getUnpackedSettings,
createServer,
createSecureServer,
connect,
Http2ServerResponse,
Http2ServerRequest,
};