基本的に、次のようにjsonrpcを使用してxbmcをポーリングしようとしています:
_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!!!');
}
});
しかし、私はparsererrorを返し続けます。ただし、curl を使用して同じ投稿を正常に実行し、目的の結果を返すことができます。
curl -i -X POST -d '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":"1"}' http://192.168.0.140:8080/jsonrpc
提案や助けをいただければ幸いです。