simple-get timeouts

node v10.24.1
version: master
endpointsharetweet
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) }) }
Loading…

no comments

    sign in to comment