{
"subject": "Re: JSON-RPC Multiple Invocations",
"content": {
"format": "html",
"body": "<div class=\"post\">Obviously it's a bug that it repeats the header.<br/><br/>I was trying to follow the 1.0 spec: <a href=\"http://json-rpc.org/wiki/specification\">http://json-rpc.org/wiki/specification</a> It called for multiple invocation.<br/><br/>I think they mean it's like this, but I'm not sure:<br/><br/>Post:<br/>{\"method\": \"postMessage\", \"params\": [\"Hello all!\"], \"id\": 99}<br/>{\"method\": \"postMessage\", \"params\": [\"I have a question:\"], \"id\": 101}<br/><br/>Reply:<br/>{\"result\": 1, \"error\": null, \"id\": 99}<br/>{\"result\": 1, \"error\": null, \"id\": 101}<br/><br/>I can't remember where I think I saw that it's supposed to send back HTTP status 500 for an error reply. If it contains multiple responses and one is an error, I wonder if that makes the status 500 for the whole thing, I guess so. Maybe it should always return 200. I think someone sounded like the 500 might be causing a problem.<br/><br/>This probably gets fixed after 0.3.3. Until then, just use single invocation. I wonder if any JSON-RPC package even supports multiple invocation, probably not.<br/><br/>It would be nice if we could pin down better how multiple-invocation is supposed to work, if at all, before trying to fix it, and whether returning HTTP status 500 for error response is right.<br/><br/></div>"
},
"source": {
"name": "Bitcoin Forum",
"url": "https://bitcointalk.org/index.php?topic=528.msg5416#msg5416"
},
"date": "2010-07-24T00:59:08Z"
}