正如标题所示,我的 API 在资源管理器中不可见,我的所有日志显示如下:
INFO 2013-03-08 13:39:08,182 dev_appserver.py:723] Internal redirection to http://127.0.0.1:8080/_ah/spi/BackendService.getApiConfigs
INFO 2013-03-08 13:39:08,198 dev_appserver.py:3104] "GET /_ah/api/discovery/v1/apis HTTP/1.1" 500 -
我的 app.yaml 文件中的相关处理程序如下所示:
13 # Endpoint handlers
14 - url: /_ah/spi/.*
15 script: main.app
我的 main.py 代码如下:
from google.appengine.ext import endpoints
from protorpc import messages
class Location(messages.Message):
reg_id = messages.StringField(1)
phone_number = messages.StringField(2)
latitude = messages.StringField(3)
longitude = messages.StringField(4)
@endpoints.api(name='locations', version='v1', description='Location API for where are you app')
class LocationApi(remote.Service):
@endpoints.method(Location, Location, name='location.insert', path='location', http_method='POST')
def insert(self, request):
return request
app = endpoints.api_server([LocationApi])
有人知道我做错了什么吗?