How do I check to see if a URL exists without pulling it down? I use the following code, but it downloads the whole file. I just need to check that it exists.
ap
Simply use url-exists npm package to test if url exists or not
var urlExists = require('url-exists'); urlExists('https://www.google.com', function(err, exists) { console.log(exists); // true }); urlExists('https://www.fakeurl.notreal', function(err, exists) { console.log(exists); // false });