我正在尝试调用发送短信的url,得到这样的错误
{ [Error: getaddrinfo ENOTFOUND alerts.sinfini.com]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'alerts.sinfini.com' }我的node js代码是
var request = require('request');
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body) // Show the HTML for the Google homepage.
}else{
console.log(error);
}
});发布于 2015-05-08 03:42:44
在上面的代码中,URL是在哪里定义的?您是否通过rest客户端检查了URL是否正常工作!无法解析为URL或DNS引发的ENoT。
https://stackoverflow.com/questions/30094070
复制相似问题