|
Project Information
Links
|
This is a simple Python JSON-RPC (v1) client over HTTP that can work threaded with callbacks or non-threaded. Threaded usage: def onResult(result):
print 'success :-) : ' + str(result)
def onError(error):
print 'failure :-( : ' + error['message']
p = Proxy('http://www.desfrenes.com/service/hello')
p.call('hello', ['John Doe'], onResult, onError)Non-threaded usage: p = Proxy('http://www.desfrenes.com/service/hello')
result = p.hello('John Doe')
print resultSupport for http basic auth: p = Proxy('http://www.desfrenes.com/service/hello','user','password')
result = p.hello('John Doe')
print result
|