From ba4a0a6f5f9f0172e182da4e9000fec8956d0689 Mon Sep 17 00:00:00 2001 From: c0b <14798161+c0b@users.noreply.github.com> Date: Sat, 21 Oct 2017 11:44:45 -0700 Subject: [PATCH] doc: fix http2 example with rstWithCancel Replace the non-existent method rstStreamWithCancel with rstWithCancel PR-URL: https://github.com/nodejs/node/pull/16365 Reviewed-By: Joyee Cheung Reviewed-By: James M Snell Reviewed-By: Anatoli Papirovski Reviewed-By: Colin Ihrig --- 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 c85de0092a72a2..c28517c731759d 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -817,7 +817,7 @@ const client = http2.connect('http://example.org:8000'); const req = client.request({ ':path': '/' }); // Cancel the stream if there's no activity after 5 seconds -req.setTimeout(5000, () => req.rstStreamWithCancel()); +req.setTimeout(5000, () => req.rstWithCancel()); ``` #### http2stream.state