1

I'm using tornado framework of python to build up my site, and I encountered a problem. Now there is a requirement my site should response to head method, but in tornado, it would only return a 405 response, while I need to return the header of the request, so how to implement the head method of tornado's requesthandler?

CodesInChaos
  • 106,488
  • 23
  • 218
  • 262
Roger Liu
  • 1,768
  • 3
  • 16
  • 25

1 Answers1

1

I had to do this recently to keep Mandril happy.

It turns out to be simple - create a head(self) function in your Handler:

class InboundEmailHandler(base.BaseHandler):

    def head(self):
        """ Satisfy Mandril that this url exists"""
        self.finish()
andy boot
  • 11,355
  • 3
  • 53
  • 66