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