def render_POST(self, request):
        """
        Read remoting request from the client.

        @type request: The HTTP Request.
        @param request: C{twisted.web.http.Request}
        """
        def handleDecodeError(failure):
            """
            Return HTTP 400 Bad Request.
            """
            errMesg = "%s: %s" % (failure.type, failure.getErrorMessage())

            if self.logger:
                self.logger.error(errMesg)
                self.logger.error(failure.getTraceback())

            body = "400 Bad Request\n\nThe request body was unable to " \
                "be successfully decoded."

            if self.debug:
                body += "\n\nTraceback:\n\n%s" % failure.getTraceback()

            self._finaliseRequest(request, 400, body)

        request.content.seek(0, 0)
        timezone_offset = self._get_timezone_offset()

        d = threads.deferToThread(remoting.decode, request.content.read(),
            strict=self.strict, logger=self.logger,
            timezone_offset=timezone_offset)

        def cb(amf_request):
            if self.logger:
                self.logger.debug("AMF Request: %r" % amf_request)

            x = self.getResponse(request, amf_request)

            x.addCallback(self.sendResponse, request)

        # Process the request
        d.addCallback(cb).addErrback(handleDecodeError)

        return server.NOT_DONE_YET
def render_POST ( self , request ) : def handleDecodeError ( failure ) : errMesg = "%s: %s" % ( failure . type , failure . getErrorMessage ( ) ) if self . logger : self . logger . error ( errMesg ) self . logger . error ( failure . getTraceback ( ) ) body = "400 Bad Request\n\nThe request body was unable to " "be successfully decoded." if self . debug : body += "\n\nTraceback:\n\n%s" % failure . getTraceback ( ) self . _finaliseRequest ( request , 400 , body ) request . content . seek ( 0 , 0 ) timezone_offset = self . _get_timezone_offset ( ) d = threads . deferToThread ( remoting . decode , request . content . read ( ) , strict = self . strict , logger = self . logger , timezone_offset = timezone_offset ) def cb ( amf_request ) : if self . logger : self . logger . debug ( "AMF Request: %r" % amf_request ) x = self . getResponse ( request , amf_request ) x . addCallback ( self . sendResponse , request ) d . addCallback ( cb ) . addErrback ( handleDecodeError ) return server . NOT_DONE_YET
Read remoting request from the client.

        @type request: The HTTP Request.
        @param request: C{twisted.web.http.Request}