Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Handle batch commands #46

Open
uSpike opened this issue Apr 9, 2019 · 1 comment
Open

Handle batch commands #46

uSpike opened this issue Apr 9, 2019 · 1 comment

Comments

@uSpike
Copy link

uSpike commented Apr 9, 2019

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'
@fscherf
Copy link
Contributor

fscherf commented Apr 10, 2019

Hi @uSpike,

Thanks for testing. You are right, support for this feature is missing.
Do you have time to implement it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants