2011-08-15, 13:56
Hi, I'm trying to play around with the JSONRPC interface, but so far I'm only getting a nasty Parse Error every time.
Here's an example of my request via telnet on port 9090:
My response is always
And this is what it has to say on my xbmc.log:
I've tried using python jsonrpc modules like json-rpc and jsonrpclib and tried using urllib directly and got the same result.
Is there a required header there that I'm not sending?
Here's an example of my request via telnet on port 9090:
Code:
POST / HTTP/1.1
{"method": "JSONRPC.Ping", "id": "5"}
My response is always
Code:
{
"error" : {
"code" : -32700,
"message" : "Parse error."
},
"id" : 0,
"jsonrpc" : "2.0"
}
And this is what it has to say on my xbmc.log:
Code:
13:52:43 T:140011613701888 M:2508509184 ERROR: JSONRPC: Failed to parse '
POST / HTTP/1.1
{"method": "JSONRPC.Ping", "id": "5"}'
I've tried using python jsonrpc modules like json-rpc and jsonrpclib and tried using urllib directly and got the same result.
Is there a required header there that I'm not sending?