JSONRPC is not working with me - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: JSONRPC is not working with me (/showthread.php?tid=107770) |
JSONRPC is not working with me - amrhassan - 2011-08-15 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: Code: POST / HTTP/1.1 My response is always Code: { 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 ' 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? - topfs2 - 2011-08-15 you are not sending a properly formatted json-rpc 2.0 request! (looks like your sending 1.1) This: Code: { "jsonrpc": "2.0", "method": "JSONRPC.Ping", "id": 1 } - amrhassan - 2011-08-15 I still get the same error :/ Code: $ telnet localhost 9090 - topfs2 - 2011-08-15 Full Debug Log on pastebin please. It works just fine here Code: topfs@tobias-desktop:~$ telnet localhost 9090 EDIT: Your telnet states post / HTTP/1.1 that sounds wrong tbh. It should be raw tcp no actual protocol overhead. - amrhassan - 2011-08-15 Oh! Right.. That's what I was doing wrong. Thanks. |