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>
process-exit-stdio-flushing
Hideki Yamamura 9 years ago
committed by James M Snell
parent
commit
c6efd535e4
  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