2010-12-20, 19:16
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"
}