I am trying to execute https request from my node server side but it give me following error :-
Caught exception: Error: CERT_UNTRUSTED
If i execute http request then it's working fine but for https links its not working.
Here is my code:-
var request = require('request');
request('https://en.m.wikipedia.org/wiki/Astrid_Olofsdotter_of_Sweden', function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body) // Show the HTML for the Google homepage.
}
})
Any Idea?
It looks like a SSL issue, Best way to fix SSL of Network Environment.
For now you can bypass issue by making rejectUnauthorized as
false