문제

I'm having a heck of a time debugging my task queues in Google app engine as a bug in the task queue becomes very hard to track down as I don't know exactly what data is being posted.

I was hoping that I could get the dev_appserver.py application to display the POST data in the request line, but I can't seem to find a way to do that. The documentation offers up a debug option, but it doesn't seem to print the post data.

Does anyone know if this is possible?

도움이 되었습니까?

해결책

You could use the logging library to print the body of the request like this (if you're using webapp):

import logging
class YourRequestHandler(webapp.RequestHandler):
    def post(self):
        logging.info("body:\n%s" % self.request.body)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top