Skip to content

Commit

Permalink
Update README.md (request#3023)
Browse files Browse the repository at this point in the history
  • Loading branch information
odykyi authored and reconbot committed Apr 4, 2019
1 parent b0e9abb commit b3a218d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Request is designed to be the simplest way possible to make http calls. It suppo
```js
const request = require('request');
request('http://www.google.com', function (error, response, body) {
console.log('error:', error); // Print the error if one occurred
console.error('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 Expand Up @@ -86,7 +86,7 @@ To easily handle errors when streaming requests, listen to the `error` event bef
request
.get('http://mysite.com/doodle.png')
.on('error', function(err) {
console.log(err)
console.error(err)
})
.pipe(fs.createWriteStream('doodle.png'))
```
Expand Down

0 comments on commit b3a218d

Please sign in to comment.