def __call__(self): method = self.request.method if method == 'GET': response = self.get() elif method == 'POST': response = self.post() elif method == 'HEAD': response = self.head() else: response = method_not_allowed() if self.cookies: response.cookies.extend(self.cookies) return response
def post(self): """ Responds to HTTP POST requests. """ return method_not_allowed()
def get(self): """ Responds to HTTP GET requests. """ return method_not_allowed()
def head(self): """ Responds to HTTP HEAD requests. """ return method_not_allowed()