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 <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
hidekiy authored and jasnell committed Dec 14, 2015
1 parent 498c9ad commit c6efd53
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 c6efd53

Please sign in to comment.