def request(self, event, request, response): req = event channel, target, vpath = self._getChannel(request) if channel and target: req.kwargs = parseQueryString(request.qs) v = self._parseBody(request, response, req.kwargs) if not v: return v # MaxSizeExceeded (return the HTTPError) if vpath: req.args += tuple(vpath) self.push(req, channel, target) return True
def request(self, event, request, response): req = event # retrieve a channel (handler) for this request channel, target, vpath, params = self._getChannel(request) if channel: # add the params from the routes match req.kwargs = params # update with any query string params req.kwargs.update(parseQueryString(request.qs)) v = self._parseBody(request, response, req.kwargs) if not v: return v # MaxSizeExceeded (return the HTTPError) if vpath: req.args += tuple(vpath) return self.push(req, channel, target=target)