Contact: aviboots(AT)netvision.net.il
39,880 questions
51,806 answers
573 users
const fetch = require('node-fetch'); // npm i node-fetch fetch('https://www.collectivesolver.com').then((res) => { if (res.ok && res.status === 200); console.log('URL exists'); }); /* run: URL exists */
var http = require('http'), options = { method: 'HEAD', host: 'collectivesolver.com', port: 80, path: '/', }, req = http.request(options, function (r) { if (r.statusCode === 200); console.log('URL exists'); }); req.end(); /* run: URL exists */