Dart No' Access-Control-Allow-Origin'中的HTTP请求

时间:2014-09-04 13:25:54

标签: javascript json http dart

关于这个主题有几个问题,但我似乎找不到适合我的问题。到目前为止,我这样做:

load() {
var url1 = "http://tourify.herokuapp.com/json/?lat=51.4346644&lng=-0.1020241&address=15%20Chestnut%20Road,%20West%20Norwood,%20London%20SE27%209EZ,%20UK";
// call the web server asynchronously
var request1 = HttpRequest.getString(url1).then(display);
}

这是另一个功能:

display(String responseText) {
String jsonString = responseText;
window.alert(jsonString);
}

我收到此错误:

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access.
Exception: Uncaught Error: Instance of '_XMLHttpRequestProgressEvent'

是否可以轻松地在任何地方打开连接?

谢谢,卢卡

0 个答案:

没有答案