正如標題所示我的API是不是在資源管理器中,我所有的日誌顯示如下:我的API不會在瀏覽器中顯示和記錄只顯示500
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])
一尼永知道我在做什麼錯了嗎?
我觀察到相同的行爲。似乎相當不自然,處理程序必須以特定順序列出。他們至少應該記錄它。 – user443854 2014-05-25 23:25:00