From f9a77dab7aa0b6db30230e924572e550cf671987 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); });