Skip to content

Commit

Permalink
doc: fix improper http.get sample code
Browse files Browse the repository at this point in the history
Refs: nodejs/node-v0.x-archive#25471
Refs: nodejs/node-v0.x-archive#8443
PR-URL: #4263
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
hidekiy authored and Myles Borins committed Dec 30, 2015
1 parent a1bd345 commit 032a8f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 032a8f0

Please sign in to comment.