def render_request_body(self, params, format=None): params = util.ensure_unicode(params) formatter = self._get_format_method(False, format=format) return formatter(params)
def parse_response_body(self, response, format=None): formatter = self._get_format_method(True, format=format) dictionary = formatter(response) return util.ensure_unicode(dictionary)