From 3dbdc25abe0ea37f30b431d903336f5ceaed65cc Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Sat, 4 Mar 2023 00:48:18 +0900 Subject: [PATCH] doc: fix port of destination server is not defined in http2 `port` variable is used, but it's not defined in client code. So need to specify destination server(not proxy)'s port(8000) in client code. Refs: https://github.com/nodejs/node/blob/main/doc/api/http2.md#supporting-the-connect-method --- doc/api/http2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 1b2d7c246367d2..3bb4e08ef655e4 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3126,7 +3126,7 @@ const client = http2.connect('http://localhost:8001'); // for CONNECT requests or an error will be thrown. const req = client.request({ ':method': 'CONNECT', - ':authority': `localhost:${port}`, + ':authority': 'localhost:8000', }); req.on('response', (headers) => {