{"_id":"node-http2","_rev":"242171","name":"node-http2","description":"An HTTP/2 client and server implementation","dist-tags":{"latest":"4.0.1"},"maintainers":[{"name":"hthetiot","email":"hthetiot@gmail.com"}],"time":{"modified":"2021-06-03T15:59:08.000Z","created":"2017-08-23T20:22:42.709Z","4.0.1":"2017-08-23T20:45:21.008Z","4.0.0":"2017-08-23T20:22:42.709Z"},"users":{},"author":{"name":"Gábor Molnár","email":"gabor@molnar.es","url":"http://gabor.molnar.es"},"repository":{"type":"git","url":"git+https://github.com/kaazing/node-http2.git"},"versions":{"4.0.1":{"name":"node-http2","version":"4.0.1","description":"An HTTP/2 client and server implementation","main":"lib/index.js","engines":{"node":">=0.12.0"},"dependencies":{"assert":"1.4.1","events":"1.1.1","https-browserify":"0.0.1","setimmediate":"^1.0.5","stream-browserify":"2.0.1","timers-browserify":"2.0.2","url":"^0.11.0","websocket-stream":"^5.0.1"},"devDependencies":{"jshint":"*","istanbul":"*","chai":"*","mocha":"*","docco":"*","browserify":"14.0.0 ","bunyan":"*"},"scripts":{"lint":"jshint","pretest":"npm run lint","test":"istanbul test _mocha -- --reporter spec --slow 500 --timeout 15000","doc":"docco lib/* --output doc --layout parallel --template root.jst --css doc/docco.css && docco lib/protocol/* --output doc/protocol --layout parallel --template protocol.jst --css doc/docco.css"},"repository":{"type":"git","url":"git+https://github.com/kaazing/node-http2.git"},"homepage":"https://github.com/kaazing/node-http2","bugs":{"url":"https://github.com/kaazing/node-http2/issues"},"keywords":["http","http2","client","server"],"author":{"name":"Gábor Molnár","email":"gabor@molnar.es","url":"http://gabor.molnar.es"},"contributors":[{"name":"Harold Thetiot"},{"name":"David Witherspoon"},{"name":"Gábor Molnár"},{"name":"Nick Hurley"},{"name":"Mike Belshe"},{"name":"Yoshihiro Iwanaga"},{"name":"Igor Novikov"},{"name":"James Willcox"},{"name":"David Björklund"},{"name":"Patrick McManus"}],"license":"MIT","gitHead":"fd5a47677404ffe9c0c25a39841de2764905ec85","_id":"node-http2@4.0.1","_shasum":"164ff53b5dd22c84f0af142b877c5eaeb6809959","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.0","_npmUser":{"name":"hthetiot","email":"hthetiot@gmail.com"},"dist":{"shasum":"164ff53b5dd22c84f0af142b877c5eaeb6809959","size":220504,"noattachment":false,"key":"/node-http2/-/node-http2-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-http2/download/node-http2-4.0.1.tgz"},"maintainers":[{"name":"hthetiot","email":"hthetiot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-http2-4.0.1.tgz_1503521120927_0.42540455469861627"},"directories":{},"publish_time":1503521121008,"_cnpm_publish_time":1503521121008,"_hasShrinkwrap":false},"4.0.0":{"name":"node-http2","version":"4.0.0","description":"An HTTP/2 client and server implementation","main":"lib/index.js","engines":{"node":">=0.12.0"},"dependencies":{"assert":"1.4.1","events":"1.1.1","https-browserify":"0.0.1","setimmediate":"^1.0.5","stream-browserify":"2.0.1","timers-browserify":"2.0.2","url":"^0.11.0","websocket-stream":"^5.0.1"},"devDependencies":{"jshint":"*","istanbul":"*","chai":"*","mocha":"*","docco":"*","browserify":"14.0.0 ","bunyan":"*"},"scripts":{"lint":"jshint","pretest":"npm run lint","test":"istanbul test _mocha -- --reporter spec --slow 500 --timeout 15000","doc":"docco lib/* --output doc --layout parallel --template root.jst --css doc/docco.css && docco lib/protocol/* --output doc/protocol --layout parallel --template protocol.jst --css doc/docco.css"},"repository":{"type":"git","url":"git+https://github.com/kaazing/node-http2.git"},"homepage":"https://github.com/kaazing/node-http2","bugs":{"url":"https://github.com/kaazing/node-http2/issues"},"keywords":["http","http2","client","server"],"author":{"name":"Gábor Molnár","email":"gabor@molnar.es","url":"http://gabor.molnar.es"},"contributors":[{"name":"Harold Thetiot"},{"name":"David Witherspoon"},{"name":"Gábor Molnár"},{"name":"Nick Hurley"},{"name":"Mike Belshe"},{"name":"Yoshihiro Iwanaga"},{"name":"Igor Novikov"},{"name":"James Willcox"},{"name":"David Björklund"},{"name":"Patrick McManus"}],"license":"MIT","gitHead":"9f8c38f2429c7ea1799bf5f11c4a7985fd20c78e","_id":"node-http2@4.0.0","_shasum":"ce7848059ec05a600ee4f1575d7f1f917463e939","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.0","_npmUser":{"name":"hthetiot","email":"hthetiot@gmail.com"},"dist":{"shasum":"ce7848059ec05a600ee4f1575d7f1f917463e939","size":220447,"noattachment":false,"key":"/node-http2/-/node-http2-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-http2/download/node-http2-4.0.0.tgz"},"maintainers":[{"name":"hthetiot","email":"hthetiot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-http2-4.0.0.tgz_1503519762505_0.31573838368058205"},"directories":{},"publish_time":1503519762709,"_hasShrinkwrap":false,"_cnpm_publish_time":1503519762709}},"readme":"node-http2\n==========\n\nAn HTTP/2 ([RFC 7540](http://tools.ietf.org/html/rfc7540))\nclient and server implementation for node.js.\n\n[![Build Status](https://travis-ci.org/kaazing/node-http2.svg?branch=master)](https://travis-ci.org/kaazing/node-http2)\n\nOriginal Source\n--------------------\n\nThis version is a fork of node-http2 hosted on Github originally made by\nGábor Molnár and available here: https://github.com/molnarg/node-http2\n\nThis fork of `node-http2` module start at version `4.0.0` in case previous repository pick-up work on version `3.x.x`. \n\nInstallation\n------------\n\n```\nnpm install node-http2\n```\n\nAPI\n---\n\nThe API is very similar to the [standard node.js HTTPS API](http://nodejs.org/api/https.html). The\ngoal is the perfect API compatibility, with additional HTTP2 related extensions (like server push).\n\nDetailed API documentation is primarily maintained in the `lib/http.js` file and is [available in\nthe wiki](https://github.com/kaazing/node-http2/wiki/Public-API) as well.\n\nExamples\n--------\n\n### Using as a server ###\n\n```javascript\nvar options = {\n  key: fs.readFileSync('./example/localhost.key'),\n  cert: fs.readFileSync('./example/localhost.crt')\n};\n\nrequire('http2').createServer(options, function(request, response) {\n  response.end('Hello world!');\n}).listen(8080);\n```\n\n### Using as a client ###\n\n```javascript\nrequire('http2').get('https://localhost:8080/', function(response) {\n  response.pipe(process.stdout);\n});\n```\n\n### Simple static file server ###\n\nAn simple static file server serving up content from its own directory is available in the `example`\ndirectory. Running the server:\n\n```bash\n$ node ./example/server.js\n```\n\n### Simple command line client ###\n\nAn example client is also available. Downloading the server's own source code from the server:\n\n```bash\n$ node ./example/client.js 'https://localhost:8080/server.js' >/tmp/server.js\n```\n\n### Server push ###\n\nFor a server push example, see the source code of the example\n[server](https://github.com/kaazing/node-http2/blob/master/example/server.js) and\n[client](https://github.com/kaazing/node-http2/blob/master/example/client.js).\n\nStatus\n------\n\n* ALPN is only supported in node.js >= 5.0\n* Upgrade mechanism to start HTTP/2 over unencrypted channel is not implemented yet\n  (issue [#4](https://github.com/molnarg/node-http2/issues/4))\n* Other minor features found in\n  [this list](https://github.com/kaazing/node-http2/issues?labels=feature) are not implemented yet\n\nDevelopment\n-----------\n\n### Development dependencies ###\n\nThere's a few library you will need to have installed to do anything described in the following\nsections. After installing/cloning node-http2, run `npm install` in its directory to install\ndevelopment dependencies.\n\nUsed libraries:\n\n* [mocha](http://mochajs.org/) for tests\n* [chai](http://chaijs.com/) for assertions\n* [istanbul](https://github.com/gotwarlost/istanbul) for code coverage analysis\n* [docco](http://jashkenas.github.io/docco/) for developer documentation\n* [bunyan](https://github.com/trentm/node-bunyan) for logging\n\nFor pretty printing logs, you will also need a global install of bunyan (`npm install -g bunyan`).\n\n### Developer documentation ###\n\nThe developer documentation is generated from the source code using docco and can be viewed online\n[here](http://molnarg.github.io/node-http2/doc/). If you'd like to have an offline copy, just run\n`npm run-script doc`.\n\n### Running the tests ###\n\nIt's easy, just run `npm test`. The tests are written in BDD style, so they are a good starting\npoint to understand the code.\n\n### Test coverage ###\n\nTo generate a code coverage report, run `npm test --coverage` (which runs very slowly, be patient).\nCode coverage summary as of version 3.0.1:\n```\nStatements   : 89.44% ( 1947/2177 )\nBranches     : 79.45% ( 816/1027 )\nFunctions    : 89.06% ( 228/256 )\nLines        : 89.53% ( 1941/2168 )\n```\n\nThere's a hosted version of the detailed (line-by-line) coverage report\n[here](http://molnarg.github.io/node-http2/coverage/lcov-report/lib/).\n\n### Logging ###\n\nLogging is turned off by default. You can turn it on by passing a bunyan logger as `log` option when\ncreating a server or agent.\n\nWhen using the example server or client, it's very easy to turn logging on: set the `HTTP2_LOG`\nenvironment variable to `fatal`, `error`, `warn`, `info`, `debug` or `trace` (the logging level).\nTo log every single incoming and outgoing data chunk, use `HTTP2_LOG_DATA=1` besides\n`HTTP2_LOG=trace`. Log output goes to the standard error output. If the standard error is redirected\ninto a file, then the log output is in bunyan's JSON format for easier post-mortem analysis.\n\nRunning the example server and client with `info` level logging output:\n\n```bash\n$ HTTP2_LOG=info node ./example/server.js\n```\n\n```bash\n$ HTTP2_LOG=info node ./example/client.js 'https://localhost:8080/server.js' >/dev/null\n```\n\nContributors\n------------\n\nThe co-maintainer of the project is [Nick Hurley](https://github.com/todesschaf).\n\nCode contributions are always welcome! People who contributed to node-http2 so far:\n\n* [Nick Hurley](https://github.com/todesschaf)\n* [Mike Belshe](https://github.com/mbelshe)\n* [Yoshihiro Iwanaga](https://github.com/iwanaga)\n* [Igor Novikov](https://github.com/vsemogutor)\n* [James Willcox](https://github.com/snorp)\n* [David Björklund](https://github.com/kesla)\n* [Patrick McManus](https://github.com/mcmanus)\n\nSpecial thanks to Google for financing the development of this module as part of their [Summer of\nCode program](https://developers.google.com/open-source/soc/) (project: [HTTP/2 prototype server\nimplementation](https://google-melange.appspot.com/gsoc/project/details/google/gsoc2013/molnarg/5818821692620800)), and\nNick Hurley of Mozilla, my GSoC mentor, who helped with regular code review and technical advices.\n\nLicense\n-------\n\nThe MIT License\n\nCopyright (C) 2013 Gábor Molnár <gabor@molnar.es>\n","_attachments":{},"homepage":"https://github.com/kaazing/node-http2","bugs":{"url":"https://github.com/kaazing/node-http2/issues"},"license":"MIT"}