### Description
It would be nice if the JSONRPC-S module would support batch requests. For example if you
want to set multiple values in htable simultaneously.
### Expected behavior
That the implementation is in line with JSON-RPC 2.0 specification and support batching.
For example:
`[
{"jsonrpc": "2.0", "method": "htable.stats",
"id": 22},
{"jsonrpc": "2.0", "method":
"htable.listTables", "id": 23}
]`
#### Actual observed behavior
Get an empty result with no error code (see Debugging data)
Only the first message is parsed when discarding the brackets (which should give a json
format error anyway, but doesn't)
`
{"jsonrpc": "2.0", "method": "htable.stats",
"id": 22},
{"jsonrpc": "2.0", "method":
"htable.listTables", "id": 23}
`
Then I get an answer to only the first request instead of expected JSON validation error.
#### Debugging Data
`curl -X POST -H "Content-Type: application/json" -d '[{"jsonrpc":
"2.0", "method": "htable.stats", "id":
22},{"jsonrpc": "2.0", "method":
"htable.listTables", "id": 23}]'
http://10.0.0.1:5060/RPC
{
"jsonrpc": "2.0",
"result": {
}
}`
#### Log Messages
`254(260) ERROR: jsonrpcs [jsonrpcs_mod.c:1263]: jsonrpc_dispatch(): missing or invalid
jsonrpc field in request`
#### SIP Traffic
N/A
### Possible Solutions
Needs a code fix
### Additional Information
https://www.jsonrpc.org/specification
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3677
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3677(a)github.com>