Skip to content

Commit

Permalink
Merge pull request #2558 from request/FredKSchott-patch-1
Browse files Browse the repository at this point in the history
Update README.md example snippet
  • Loading branch information
FredKSchott committed Feb 22, 2017
2 parents 6862553 + 8d78bd0 commit 667e923
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -18,10 +18,10 @@ Request is designed to be the simplest way possible to make http calls. It suppo
```js
var request = require('request');
request('http://www.google.com', function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body) // Show the HTML for the Google homepage.
}
})
console.log('error:', error); // Print the error if one occurred
console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
console.log('body:', body); // Print the HTML for the Google homepage.
});
```


Expand Down

0 comments on commit 667e923

Please sign in to comment.