JSON-RPC Interface : HTTP Response?
#1
Hi,

I am sending JSON-RPC commands to the JSONRPC interface of kodi via HTTP from a Javascript client. On the client, I use jQuery and Ajax to send the request:

This is the code:
Code:
$.ajax({
    url: '/jsonrpc',
    type: 'POST',
    async: true,
    headers: {
              'Accept': 'application/json',
              'Content-Type': 'application/json'
                   },
    data: json_str,
    dataType: 'json'
});

It works very well, but using Firebug on Firefox to monitor the HTTP communications, I noticed that Kodi does not send back any response to the HTTP POST request.

Am I doing something wrong?

Do I have write Phyton code to generate the response?
Reply
#2
what do your payloads look like?
according to json 2.0 spec, if you want a response you must include an "id" key in the json payload... not sure if kodi complies to or what your data looks like but...
Reply
#3
I had the same problem and i was missing the id property. It worked without it but i got no response which made the program buggy =)
Reply

Logout Mark Read Team Forum Stats Members Help
JSON-RPC Interface : HTTP Response?0