Google app engine 简单的谷歌云端点应用程序
经过两天多的努力,我现在要寻求帮助。这只是一个简单的应用程序,只是为了让谷歌云端点工作。它部署得很好,但实际上不起作用。调试起来很困难,因为没有错误消息。这是我的密码: app.yamlGoogle app engine 简单的谷歌云端点应用程序,google-app-engine,google-cloud-endpoints,Google App Engine,Google Cloud Endpoints,经过两天多的努力,我现在要寻求帮助。这只是一个简单的应用程序,只是为了让谷歌云端点工作。它部署得很好,但实际上不起作用。调试起来很困难,因为没有错误消息。这是我的密码: app.yaml application: [my-simple-api] version: 1 runtime: python27 threadsafe: true api_version: 1 handlers: - url: /_ah/spi/.* script: main.application librarie
application: [my-simple-api]
version: 1
runtime: python27
threadsafe: true
api_version: 1
handlers:
- url: /_ah/spi/.*
script: main.application
libraries:
- name: endpoints
version: "1.0"
main.py
#should this be "from google.appengine.ext import endpoints"?
import endpoints
from protorpc import messages
from protorpc import message_types
from protorpc import remote
class SimpleMessage(messages.Message):
message = messages.StringField(1)
@endpoints.api(name='simple', version='v1')
class SimpleApi(remote.Service):
@endpoints.method(message_types.VoidMessage, SimpleMessage, path='simpleget', http_method='GET', name='simple.get')
def simple_get(self, unused_request):
return SimpleMessage(message="hello this is a simple api")
application = endpoints.api_server([SimpleApi])
什么不起作用?是否收到错误消息?API资源管理器上没有显示任何内容。我检查过了,实际上有一个错误消息:
Endpoints:https://1-dot-[my simple api].appspot.com//u ah/api/simple@v1错误:错误的API配置:“bodyName”是不允许的字段。
是否可以尝试重新部署?这个错误消息听起来像是今天早些时候修复的问题。现在可以正常工作了。天知道为什么@丹·霍勒维特:你有可能是谷歌的员工吗?我确实是。:)我们回滚了导致此问题和类似问题的版本。