これは、このエラーが存在するコードを実行した後に私の完全なcode ...いいえ「アクセス制御 - 許可 - 起源」ヘッダがIonic2 HTTP POSTリクエストに応じ存在する
this.http.post(link, data, { headers: headers })
.map(res => res.json())
.subscribe(data => {
this.data.response = data._body;
}, error => {
console.log("Oooops!");
});
です:
"XMLHttpRequest cannot load
https://script.google.com/macros/s/AKfycbzdHHKBmLWJYZtFGlJGOrUwlPIWXor1geEOgcSgvhs/dev.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost:8100' is therefore not allowed access.
The response had HTTP status code 401."
任意の助けが理解されるであろう私は約CORSを検索した...しかし、私はそれのまわりで私の頭を取得することはできません...
。
重複:http://stackoverflow.com/questions/30132885/ionic-app-cannot-connect-cors-enabled-server-with-http – Quentin
関連:http://stackoverflow.com/questions/35553500/xmlhttprequest -cannot-load-https-www-website-com/ – Quentin
あなたのPOSTリクエストを送信しているリンクには、リクエストしている情報にアクセスするためのサーバーからのアクセス権がありません。サーバー通信 – repzero