【发布时间】:2014-02-08 22:01:30
【问题描述】:
我正在尝试从我的自定义 azure 移动服务 Web 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...
你有什么建议吗?
【问题讨论】:
标签: node.js azure azure-mobile-services