简体   繁体   中英

Endpoints work on localhost but not on app engine (omitted https://)

I would like to access my endpoint function without using OAuth.

I follow the guide on Simple access to API and tweak the code a little.

I can access the API on localhost - I have to wait for about five minutes for them to load. Then they appear in the explorer /_ah/api/explorer .

But I can't access the endpoint functions on 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://1-dot-helloworld-146410.appspot.com/

I didn't include the https:// and used

helloworld-146410.appspot.com

1-dot-helloworld-146410.appspot.com

without https: I wasn't able to access the endpoints

Can I get the 30+ hours of my life back please?:D How could have I avoided this mistake or figured it out faster?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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