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: nodejs#4263
Reviewed-By: Rod Vagg <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
hidekiy authored and Michael Scovetta committed Apr 2, 2016
1 parent d9f13a6 commit f9a77da
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 f9a77da

Please sign in to comment.