I need to make a crawler. For http request i used to do this.
var http=require('http'); var options={ host:'http://www.example.com', path:'/foo/example' }; callback=function(response){ var str=''; response.on('data',function(chunk){ str+=chunk; }); response.on('end', function () { console.log(str); }); } http.request(options, callback).end(); but I have to make a crawler for https://example.com/foo/example If I am using the same for https://example.com/foo/example it is giving this error
events.js:72 throw er; // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND at errnoException (dns.js:37:11) at Object.onanswer [as oncomplete] (dns.js:124:16)
httpsmodule'srequestmethod?