API on frodo HTTP/1.1 415 Unsupported Media Type

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ranpow Offline
Junior Member
Posts: 13
Joined: Dec 2012
Reputation: 0
Post: #1
Hi,
Just updated from Eden to Frodo and it looks like CURL commands doesnt work anymore and the API had important schema change that i cant find on the wiki
Basicly im getting
HTTP/1.1 415 Unsupported Media Type
for every call for example
curl -i -X POST -d '{"jsonrpc":"2.0", "method":"Application.Quit"}' http://xbmc:www@localhost:8080/jsonrpc
curl -i -X POST -d '{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "dvd://dev/dvd" } }, "id": 1 }' http://xbmc:www@localhost:8080/jsonrpc

HTTP/1.1 415 Unsupported Media Type
Content-Length: 0
Date: Mon, 28 Jan 2013 13:17:40 GMT

Thanks,
find quote
Montellese Online
Team-XBMC Developer
Posts: 2,790
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #2
As mentioned many times already and as also explained in the "Frodo API changes" article on the wiki (see http://wiki.xbmc.org/index.php?title=Fro...#HTTP_POST ) you need to specify the
Code:
Content-Type: application/json
header in your HTTP request. There are also some examples in the forum that contain the syntax on how to do this with CURL.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
ranpow Offline
Junior Member
Posts: 13
Joined: Dec 2012
Reputation: 0
Post: #3
Thanks,
The -H over looked it on the wiki.
find quote