doc: update http2.md example code
`require('http');` should be `require('http2');` PR-URL: https://github.com/nodejs/node/pull/14979 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
82bad0b4d8
commit
d70d36b3b2
@ -893,7 +893,7 @@ invoked with two arguments: an Object containing the received
|
||||
For example:
|
||||
|
||||
```js
|
||||
const http2 = require('http');
|
||||
const http2 = require('http2');
|
||||
const client = http2.connect('https://localhost');
|
||||
const req = client.request({ ':path': '/' });
|
||||
req.on('response', (headers, flags) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user