From 7983577e41943d6824147c3ae0c5230e6f3d29ed Mon Sep 17 00:00:00 2001 From: Hideki Yamamura Date: Sun, 13 Dec 2015 13:25:44 +0900 Subject: [PATCH] doc: fix improper http.get sample code Refs: https://github.com/nodejs/node-v0.x-archive/pull/25471 Refs: https://github.com/nodejs/node-v0.x-archive/issues/8443 PR-URL: https://github.com/nodejs/node/pull/4263 Reviewed-By: Rod Vagg Reviewed-By: Myles Borins Reviewed-By: James M Snell --- doc/api/http.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 091f738be6b2fa..518dae063c52b8 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -966,6 +966,8 @@ Example: http.get("http://www.google.com/index.html", function(res) { console.log("Got response: " + res.statusCode); + // consume response body + res.resume(); }).on('error', function(e) { console.log("Got error: " + e.message); });