我正在尝试从我的自定义azure移动服务网络API发出外部请求。 我知道它运行节点js所以我搜索了解决方案....我想出了这个解决方案:
exports.get = function(request, response) {
var http = require('http');
http.get("YOURSITE",
function(res) {
console.log("Got response: " + res.statusCode);
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
response.send(statusCodes.OK, { message : 'YOURMESSAGE' });
};
I get the following message: connect EACCES which means that I don't have the right permission... Besided this, I went to the configure tab in my mobile service and added at The Cross-origin resource sharing MYSITE, but I was pretty sure it won't help...
你有什么建议吗?
答案 0 :(得分:0)
我没有注意,我把我的本地IP地址,这就是为什么我没有访问权限。这适用于外部ips。