
Untitled
By: a guest on
Jun 17th, 2012 | syntax:
None | size: 0.86 KB | hits: 38 | expires: Never
xbmc jsonrpc and jquery
_data = '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":"1"}';
_XBMCHOST = "http://192.168.0.140:8080/jsonrpc";
$.ajax({
dataType: 'jsonp',
data: _data,
jsonp: 'jsonp_callback',
url: _XBMCHOST,
success: function () {
console.log( 'here here here');
},
error:function( result ){
console.log( result );
console.log('error!!!');
}
});
curl -i -X POST -d '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":"1"}' http://192.168.0.140:8080/jsonrpc
$.ajax({
dataType: 'jsonp',
data: _data,
jsonp: 'jsonp_callback',
url: _XBMCHOST,
type: 'post', //make this a post instead of a get
success: function () {
console.log( 'here here here');
},
error:function( result ){
console.log( result );
console.log('error!!!');
}
});