하지만 webapp2 프로젝트 구조 구성 : Base.py 내부에 하나 개의 클래스 :파이썬 내가 핸들러는 I라는 이름의 파일이 폴더에 그것을</p> <p><a href="https://i.stack.imgur.com/hxfOm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hxfOm.png" alt="enter image description here"></a></p> <p>을 테스트하려고 할 때이 문제가
,727 내부 EchoHandler.py와 하나 개의 클래스 : 같은 폴더 처리기에서def get_success_reponse(**kwargs):
kwargs.update(
dict(
status="SUCCESS",
)
)
return kwargs
class BaseHandler(webapp2.RequestHandler):
property = 0
나는 다른라는 이름의 파일이
내 main.py 파일
import webapp2
import config
app = webapp2.WSGIApplication([
webapp2.Route('/x/v1/echo', handler='handlers.EchoHandler')
], debug=True, config=config.WEBAPP2CONFIG)
내 애플리케이션 제목을
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /x/.*
script: main.py
libraries:
- name: webapp2
version: latest
- name: jinja2
version: latest
- name: ssl
version: latest
문제처럼 보인다
내가 http://localhost:8080/x/v1/echo에 POST 요청 sendind이 데이터 작업을 수행 할 때 :
{
"echo": "Test"
}
나는 응답 "200 OK"를 수신하지만 난이 "http://localhost:8080/x/v1/echo"로 변경 "http://localhost:8080/x/v1/echoasdfa"나는 너무 좋아 (200)를 수신 할 경우 나는 어떤 로그가
를 기록되지 않습니다 어떤 JSON 응답을하지 않습니다.도와 주시겠습니까?