我正在尝试从我的node服务器端执行https请求,但它给我以下错误:
如果我执行
这是我的代码:-
有什么想法吗?
Caught exception: Error: CERT_UNTRUSTED
如果我执行
http请求
,则一切正常,但对于https
链接,它无法工作。这是我的代码:-
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.
}
})
有什么想法吗?
,{strictSSL: false}
选项怎么样? - Weibo Chennpm
和node
? - Pritish Vaidya