Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #3023

Merged
merged 1 commit into from Apr 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -18,7 +18,7 @@ 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) {
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