Browse Source

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 <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v5.x
Hideki Yamamura 9 years ago
committed by cjihrig
parent
commit
b9ce3ebf45
  1. 2
      doc/api/http.markdown

2
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);
});

Loading…
Cancel
Save