diff options
author | c0b <14798161+c0b@users.noreply.github.com> | 2017-10-21 21:44:45 +0300 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2017-10-24 00:35:51 +0300 |
commit | 73915d3ff857e8ab67d94fd4a6be29ab91a948f1 (patch) | |
tree | e5728aea1daf2cc366f58d077733de5ea5fd713a /doc | |
parent | e1cff102f454b9474586d3f77fee38389b78d005 (diff) |
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 <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/http2.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md index 343b1509007..75afbc6e86d 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 |