-2

I have problem with one website(juvalis.de) , callback function is not executed.I tried to add headers... and still doesn't work. With curl works just fine and with other websites works fine, any suggestions?

var request=require('request');
request({
   uri: "https://www.juvalis.de",
   headers:{
      'user-agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36  '
   }, },
   function(error, response, body) {
      if(error)throw error;
      console.log(body);
}); 
  • It seems a duplicated question to [this one](http://stackoverflow.com/questions/7967037/how-to-make-external-http-requests-with-node-js). – Vinícius Fagundes Jan 16 '16 at 21:22
  • yeah, but still doesnt work,var http = require('https'); var options = { host: 'www.juvalis.de', port: 443, path: '/' }; http.get(options, function(resp){ resp.on('data', function(chunk){ }); }).on("error", function(e){ console.log("Got error: " + e.message); }); – Aleksa Manasijevic Jan 16 '16 at 21:30
  • I can't find `uri` (or `url`) in the property list of Node's request object at https://nodejs.org/api/http.html#http_http_request_options_callback. Are you using the same request object property names for sites that work? – traktor Jan 16 '16 at 23:05
  • I am using request lib https://www.npmjs.com/package/request – Aleksa Manasijevic Jan 16 '16 at 23:14
  • but also doesn't work without request lib var https=require('https'); var options = { host: 'www.juvalis.de', // port: 443, // path: '/' }; https.get(options, function(res) { console.log("Got response: " + res.statusCode); }).on('error', function(e) { console.log("Got error: " + e.message); }); – Aleksa Manasijevic Jan 16 '16 at 23:15

1 Answers1

0

I ask same question on github and I get this answer:Thanks for your patience as we got to the root of the problem. So in conclusion, there has been issues like this, and the fix was pushed master. But to my understanding, some of the support for other versions will drop in the following weeks. But there is a temp solution: https://nodejs.org/download/nightly/. If you follow some of the references & links, you can look further into it. But for now, my advice is just to wait for a few weeks. https://github.com/nodejs/help/issues/78