在我的应用程序中,app.yaml(相关部分)如下所示:
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /logs
script: logviewer.main.app
- url: /static
static_dir: static
- url: /(.*\.html)
static_files: pages/\1
upload: pages/(.*\.html)
- url: /_ah/spi/.*
script: api.application
- url: .*
script: main.app
我已经包含了所有处理程序,只是为了确保,但我很确定 app.yml 不是问题。
api.py 的相关部分
@endpoints.api(name='quizservice',version='v01',
description='api backand for quickbuzzer')
class QuizService(remote.Service):
@endpoints.method(messages.VoidMessage , messages.CreateQuizResponse, name="createQuiz")
def createQuiz(self, request):
. . .
application = endpoints.api_server([QuizService],
restricted=False)
现在,当我访问资源管理器并尝试运行 QuiizService.createQuiz 方法时,我得到了 404。
查看日志,我看到了这一点:
INFO 2013-04-29 17:53:15,560 server.py:561] default: "GET /_ah/api/discovery/v1/apis/quizservice/v01/rest HTTP/1.1" 200 2738
INFO 2013-04-29 17:53:22,118 server.py:561] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 200 1585
WARNING 2013-04-29 17:53:22,119 api_config_manager.py:201] No endpoint found for path: quizservice/v01
INFO 2013-04-29 17:53:22,119 server.py:561] default: "POST /_ah/api/quizservice/v01 HTTP/1.1" 404 9