Exemplo n.º 1
0
 def locateChild(self, ctx, segments):
     from higgins.http.server import parsePOSTData
     request = iweb.IRequest(ctx)
     if request.method == "POST":
         return parsePOSTData(request).addCallback(
             lambda x: self.__original.locateChild(ctx, segments))
     return self.__original.locateChild(ctx, segments)
Exemplo n.º 2
0
 def http_POST(self, request):
     """
     Respond to a POST request.
     Reads and parses the incoming body data then calls L{render}.
     @param request: the request to process.
     @return: an object adaptable to L{iweb.IResponse}.
     """
     return server.parsePOSTData(request).addCallback(
         lambda res: self.render(request))
Exemplo n.º 3
0
 def renderHTTP(self, ctx):
     from higgins.http.server import parsePOSTData
     request = iweb.IRequest(ctx)
     if request.method == "POST":
         return parsePOSTData(request).addCallback(self.__reallyRender, ctx)
     return self.__reallyRender(None, ctx)