From 17a25f1153b9c7aabb8e55f8eaebb28aef16b6b2 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Mon, 6 Mar 2023 09:29:27 +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 PR-URL: https://github.com/nodejs/node/pull/46940 Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga Reviewed-By: Marco Ippolito --- 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 02b2e71381a47b..518990a2e9cb8c 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3112,7 +3112,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) => {