Skip to content

Commit 3065b02

Browse files
authored
Added example of batch request to README.
1 parent 7bf4326 commit 3065b02

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,22 @@ Now this is how calls and responses will look like:
5656
-> {"jsonrpc": "2.0", "method": "api1.example.try", "id": 1}
5757
<- {"jsonrpc": "2.0", "result": "You've got it!", "id": 1}
5858
59-
-> {"jsonrpc": "2.0", "method": "api1.example.try-with-params", "params": {"foo": "bar"}, "id": 2}
59+
-> {"jsonrpc": "2.0", "method": "api1.example.try-with-params", "params": {"foo": "bar"}, "id": 2}
6060
<- {"jsonrpc": "2.0", "result": "Params received: $foo = bar.", "id": 2}
6161
6262
-> {"jsonrpc": "2.0", "method": "api1.example.garbage", "id": 3}
6363
<- {"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found."}, "id": 3}
64+
65+
-> [
66+
{"jsonrpc": "2.0", "method": "api1.example.try", "id": 1},
67+
{"jsonrpc": "2.0", "method": "api1.example.try-with-params", "params": {"foo": "bar"}, "id": 2},
68+
{"jsonrpc": "2.0", "method": "api1.example.garbage", "id": 3}
69+
]
70+
<- [
71+
{"jsonrpc": "2.0", "result": "You've got it!", "id": 1},
72+
{"jsonrpc": "2.0", "result": "Params received: $foo = bar.", "id": 2},
73+
{"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found."}, "id": 3}
74+
]
6475
```
6576

6677

0 commit comments

Comments
 (0)