[英]Endpoints work on localhost but not on app engine (omitted https://)
我想不使用OAuth訪問我的終結點函數。
我遵循有關API的簡單訪問的指南,並對代碼進行一些調整。
我可以在本地主機上訪問API-我必須等待大約五分鍾才能加載它們。 然后它們出現在資源管理器/ _ah / api / explorer中 。
但是我無法訪問App Engine上的終結點函數:
函數加載但我無法訪問它們:
var rootpath = "//" + window.location.host + "/_ah/api";
gapi.client.load('helloworldendpoints', 'v1', makeRequest, rootpath);
// callback gets executed
...
var request = gapi.client.helloworldendpoints.sayHello();
//any code below this does not get executed
因此,這對我來說是迄今為止編碼中最棘手的錯誤!
代替
https://helloworld-146410.appspot.com/
https://1-dot-helloworld-146410.appspot.com/
我沒有包含https://並使用
helloworld-146410.appspot.com
1-dot-helloworld-146410.appspot.com
沒有https:我無法訪問端點
我可以恢復30多個小時的生活嗎?:D我如何避免這個錯誤或更快地弄清楚呢?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.