aiohttp-json-rpc
aiohttp-json-rpc copied to clipboard
Handle batch commands
trafficstars
JSON-RPC 2.0 spec:
6 Batch To send several Request objects at the same time, the Client MAY send an Array filled with Request objects.
This currently (aiohttp-json-rpc 0.12.1) fails as:
future: <Task finished coro=<JsonRpc._handle_rpc_msg() done, defined at venv/lib/python3.6/site-packages/aiohttp_json_rpc/rpc.py:280> exception=AttributeError("'list' object has no attribute 'get'",)>
Traceback (most recent call last):
File "venv/lib/python3.6/site-packages/aiohttp_json_rpc/rpc.py", line 282, in _handle_rpc_msg
msg = decode_msg(raw_msg.data)
File "venv/lib/python3.6/site-packages/aiohttp_json_rpc/protocol.py", line 70, in decode_msg
raise RpcInvalidRequestError(msg_id=msg_data.get('id', None))
AttributeError: 'list' object has no attribute 'get'
Hi @uSpike,
Thanks for testing. You are right, support for this feature is missing. Do you have time to implement it?