def json_method(method):
 def wrapper(self, url, params=NoDefault, **kw):
  content_type = 'application/json'
  if (params is not NoDefault):
   params = dumps(params, cls=self.JSONEncoder)
  kw.update(params=params, content_type=content_type, upload_files=None)
  return self._gen_request(method, url, **kw)
 subst = dict(lmethod=method.lower(), method=method)
 wrapper.__doc__ = (json_method.__doc__ % subst)
 wrapper.__name__ = str(('%(lmethod)s_json' % subst))
 return wrapper

def json_method ( method ) : def wrapper ( self , url , params = NoDefault , ** kw ) : content_type = 'application/json' if ( params is not NoDefault ) : params = dumps ( params , cls = self . JSONEncoder ) kw . update ( params = params , content_type = content_type , upload_files = None ) return self . _gen_request ( method , url , ** kw ) subst = dict ( lmethod = method . lower ( ) , method = method ) wrapper . __doc__ = ( json_method . __doc__ % subst ) wrapper . __name__ = str ( ( '%(lmethod)s_json' % subst ) ) return wrapper
do a %s request .