def execute(self, chain, request, env={}): if "payload" in env: marshaller = Converters.marshaller_for(request.headers.get("Content-type")) env["body"] = marshaller.marshal(env["payload"]) del (env["payload"]) return chain.follow(request, env)
def execute(self, chain, request, env={}): if "payload" in env: content_type = request.headers.get("Content-Type") marshaller = Converters.marshaller_for(content_type) env["body"] = marshaller.marshal(env["payload"]) del (env["payload"]) return chain.follow(request, env)
def resource(self): if 'content-type' in self.response[0]: contenttype = self.response[0]['content-type'].split(';')[0] else: contenttype = None converter = Converters.marshaller_for(contenttype) return converter.unmarshal(self.body)
def resource(self): if "content-type" in self.response[0]: contenttype = self.response[0]["content-type"].split(";")[0] else: contenttype = None converter = Converters.marshaller_for(contenttype) return converter.unmarshal(self.body)
def resource(self): """ Returns the unmarshalled object of the response body """ if 'content-type' in self.response[0]: contenttype = self.response[0]['content-type'].split(';')[0] else: contenttype = None converter = Converters.marshaller_for(contenttype) return converter.unmarshal(self.body)