繁体   English   中英

端点可在localhost上运行,但不能在应用程序引擎上运行(省略https://)

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM