API Documentation - JSON
4 posts
• Page 1 of 1
Just a quick thing, could you update the API Documentation "Section 2.1 XML or JSON" to note that you need to add the header "Accept: application/json" if you want serviio to respond with json. You noted that you need to set Content-Type so I did that and I then spent 20 min wondering why the response was xml. Mostly my fault as its my first attempt at writing anything that uses webservices, but hopefully it will save someone else some time.
Re: API Documentation - JSON
will do thanks
Petr
Serviio developer / site admin
Do not send me PM for support as the solution can't be shared with others.
Follow Serviio on Facebook | Follow Serviio on Twitter
Help translate Serviio
Intel UPnP tools | HOWTO: Turn on detailed logging | HOWTO: Provide supported formats of a device | HOWTO: Provide details of a video file that doesn't play
Serviio developer / site admin
Do not send me PM for support as the solution can't be shared with others.
Follow Serviio on Facebook | Follow Serviio on Twitter
Help translate Serviio
Intel UPnP tools | HOWTO: Turn on detailed logging | HOWTO: Provide supported formats of a device | HOWTO: Provide details of a video file that doesn't play
Re: API Documentation - JSON
To use json you can either :
- Set HTTP header "Accept: application/json" to your requests.
- Add "media=json" to your request parameters (in URL or in submitted forms).
For example :
http://localhost:23423/rest/application => get XML response
http://localhost:23423/rest/application?media=json => get JSON response
Or use both...
- Set HTTP header "Accept: application/json" to your requests.
- Add "media=json" to your request parameters (in URL or in submitted forms).
For example :
http://localhost:23423/rest/application => get XML response
http://localhost:23423/rest/application?media=json => get JSON response
Or use both...
Serviio WebUI console developer : New Homepage | Support | Project | Issues
Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
Re: API Documentation - JSON
kairoh wrote:http://localhost:23423/rest/application?media=json => get JSON response
Thanks, that will be useful for testing things out quickly without using CURL.
4 posts
• Page 1 of 1
Return to Third-party tools integration
Who is online
Users browsing this forum: No registered users and 19 guests