JSON-RPC over HTTP?
#5
darkscout Wrote:http://boshdirect.com/blogs/tech/set-xbm...brary.html

Or if you just want to use curl.
Code:
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlaylist.Add", "params": { "file": "/home/xbmc/Music/Adele - 19/101-adele-daydreams.mp3"}, "id": 1}' http://localhost:9019/jsonrpc

Ok, I'm using curl on windows. I'm trying to do a test to confirm it works. It is not working. I'm guessing my data syntax in not getting parsed correctly by the command line? Any ideas?
Code:
c:\curl>curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.PlayPause"}' -u xbmc:xbmc http://localhost:80/jsonrpc
curl: (6) Could not resolve host: 2.0,; No data record of requested type
curl: (6) Could not resolve host: method; No data record of requested type
curl: (3) [globbing] unmatched close brace/bracket at pos 22
HTTP/1.1 200 OK
Content-Length: 115
Content-Type: application/json
Date: Mon, 20 Dec 2010 17:13:39 GMT

{
   "error" : {
      "code" : -32700,
      "message" : "Parse error."
   },
   "id" : 0,
   "jsonrpc" : "2.0"
}
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply


Messages In This Thread
JSON-RPC over HTTP? - by bradvido88 - 2010-12-20, 17:24
[No subject] - by _Andy_ - 2010-12-20, 17:59
[No subject] - by darkscout - 2010-12-20, 18:01
[No subject] - by bradvido88 - 2010-12-20, 18:17
[No subject] - by bradvido88 - 2010-12-20, 19:16
[No subject] - by Montellese - 2010-12-20, 20:42
[No subject] - by bradvido88 - 2010-12-20, 20:49
[No subject] - by darkscout - 2010-12-20, 21:51
[No subject] - by bradvido88 - 2010-12-20, 21:52
[No subject] - by plumser - 2010-12-21, 19:49
[No subject] - by Adam - 2011-01-01, 04:57
[No subject] - by Montellese - 2011-01-01, 11:46
[No subject] - by toenuff - 2011-01-04, 05:26
[No subject] - by toenuff - 2011-01-04, 05:45
[No subject] - by manxam - 2011-01-05, 09:17
[No subject] - by Montellese - 2011-01-05, 10:48
Actionscript 2.0 - by TheyKilledKenny - 2011-01-07, 13:18
[No subject] - by Montellese - 2011-01-07, 14:08
[No subject] - by TheyKilledKenny - 2011-01-07, 18:41
[No subject] - by Montellese - 2011-01-07, 20:27
[No subject] - by ArcticGiraffe - 2011-08-13, 02:08
[No subject] - by topfs2 - 2011-08-13, 10:40
[No subject] - by ArcticGiraffe - 2011-08-13, 15:32
[No subject] - by topfs2 - 2011-08-13, 18:48
[No subject] - by ArcticGiraffe - 2011-08-13, 19:27
RE: JSON-RPC over HTTP? - by Richard6360 - 2016-05-22, 11:38
Logout Mark Read Team Forum Stats Members Help
JSON-RPC over HTTP?1