Tag: getaddrinfo

nodejs httprequest与数据 – 获取错误getaddrinfo ENOENT

更新 – 自我回答我看到一个人必须确保从机器上正确parsingDNS,检查这个代码,以确保URL是可达的nodejs.org/docs/latest/api/dns.html#dns.resolve 原来的问题 我正在编写一个基于节点的程序,在这个程序中,用户可以要求我代表他执行一个httprequest(当然,他们提供了一些数据和方法来调用),但是每次我做一个httprequest,它都会给我一个错误 getaddrinfo ENOENT这是我的代码的外观 function makehttprequest(deviceid, httpaction, httppath,methods, actiondata, callback) { console.log('we are here with httpaction' + httpaction + ' path ' + httppath + ' method ' + methods + ' action data ' + actiondata); //do the http post work, get the data, and call the callback function with return […]