[英]Endpoints work on localhost but not on app engine (omitted https://)
I would like to access my endpoint function without using OAuth. 我想不使用OAuth访问我的终结点函数。
I follow the guide on Simple access to API and tweak the code a little. 我遵循有关API的简单访问的指南,并对代码进行一些调整。
I can access the API on localhost - I have to wait for about five minutes for them to load. 我可以在本地主机上访问API-我必须等待大约五分钟才能加载它们。 Then they appear in the explorer /_ah/api/explorer .
然后它们出现在资源管理器/ _ah / api / explorer中 。
But I can't access the endpoint functions on app engine: 但是我无法访问App Engine上的终结点函数:
the functions load but I can't access them: 函数加载但我无法访问它们:
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
So this has been the most excruciating error for me in coding so far!:D 因此,这对我来说是迄今为止编码中最棘手的错误!
instead of 代替
https://helloworld-146410.appspot.com/ https://helloworld-146410.appspot.com/
https://1-dot-helloworld-146410.appspot.com/ https://1-dot-helloworld-146410.appspot.com/
I didn't include the https:// and used 我没有包含https://并使用
helloworld-146410.appspot.com helloworld-146410.appspot.com
1-dot-helloworld-146410.appspot.com 1-dot-helloworld-146410.appspot.com
without https: I wasn't able to access the endpoints 没有https:我无法访问端点
Can I get the 30+ hours of my life back please?:D How could have I avoided this mistake or figured it out faster? 我可以恢复30多个小时的生活吗?:D我如何避免这个错误或更快地弄清楚呢?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.