Examples
The eth_getFilterChange API is used as an example. Different from a single request, a batch request's request body encapsulates multiple sub-requests in arrays. The server returns the response of each sub-request in an array.
Example of a Single Request
curl https://your-http-endpoint/v1/<API-KEY> \ -X POST \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x16"],"id":1}'
Example of Batch Requests
curl https://your-http-endpoint/v1/<API-KEY> \ -X POST \ -H "Content-Type: application/json" \ -d '[{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x16"],"id":1}, {"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x16"],"id":2}, {"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x16"],"id":3}, {"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x16"],"id":4}]'
Return Value
Response arrays corresponding to each RPC call.
[{"jsonrpc":"2.0","id":1,"result":null},{"jsonrpc":"2.0","id":2,"result":null},{"jsonrpc":"2.0","id":3,"result":null},{"jsonrpc":"2.0","id":4,"result":null}]
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot