Created
September 25, 2017 16:46
-
-
Save kuhel/e263bdaff3e431b792a0d741dd533bb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const request = require('request'); | |
fs.readFile('./config.json', 'utf-8', (err, data) => { | |
if (err) { | |
throw new Error(err); | |
} | |
request('http://www.google.com', (error, response, body) => { | |
console.log('statusCode:', response.statusCode); // Print the response status code if a response was received | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment