Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Change http.get example to use string overload shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
adammw committed May 16, 2012
1 parent c413c2b commit 6e0a8bb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,7 @@ that it sets the method to GET and calls `req.end()` automatically.

Example:

var options = {
host: 'www.google.com',
port: 80,
path: '/index.html'
};

http.get(options, function(res) {
http.get("http://www.google.com/index.html", function(res) {
console.log("Got response: " + res.statusCode);
}).on('error', function(e) {
console.log("Got error: " + e.message);
Expand Down

0 comments on commit 6e0a8bb

Please sign in to comment.