const get = require('simple-get')
const host = 'google.com'
test('http')
test('https')
function test (protocol) {
get({ url: `${protocol}://${host}`, timeout: 10 }, function (err, res) {
console.log(`done: ${protocol}`)
if (err) return console.error(`error: ${err}`)
console.log('response', res.statusCode)
})
}