I know that the XMLRPC spec doesn't support keyword arguments, but JSONRPC
does. I have been playing with the new simplejsonrpc client and it doesn't
seem to support keyword arguments.
Here is an example controller:
@service.jsonrpc
def concat(str1, str2, str3=''):
"""
Concatenates two strings. Supply a third string if needed.
"""
return str1 + str2 + str3
And for the client code (from console):
from gluon.contrib.simplejsonrpc import JSONRPCClient
c = JSONRPCClient('http://127.0.0.1:8000/rpc_test/default/call/jsonrpc')
c.concat('hello ', 'world', str3='!!!')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: <lambda>() got an unexpected keyword argument 'str3'
Is it possible that the new simplejsonrpc client could support this?
Thanks