2012-11-14, 14:04
Hi,
I'm developing a DVBLink Server PVR Addon for XBMC. The DVBLink API uses http post, which makes it a bit difficult to work with in relation to XBMC. I know I can't use Libcurl and was thus trying out the XBMC (CHelper_libXBMC_addon) methods OpenFileForWrite/WriteFile. They seemed to work in that they infact is using http post and request are getting to the server, but server don't return what was expected (xml data).
After some investigation I found out that when used on http they use the CHTTPFile::Write method. In this method I can see that the mime type is forced to be "application/json". Is this a bug or intentional ? I know it is likely because it in the past has only been used with json call, but would it be possible to make it a more general solution ?
Just to see what happend I tried to change it to general http post content type "application/x-www-form-urlencoded", and guess what it worked But it just puts even more emphasis on my question
/Zeroniak
I'm developing a DVBLink Server PVR Addon for XBMC. The DVBLink API uses http post, which makes it a bit difficult to work with in relation to XBMC. I know I can't use Libcurl and was thus trying out the XBMC (CHelper_libXBMC_addon) methods OpenFileForWrite/WriteFile. They seemed to work in that they infact is using http post and request are getting to the server, but server don't return what was expected (xml data).
After some investigation I found out that when used on http they use the CHTTPFile::Write method. In this method I can see that the mime type is forced to be "application/json". Is this a bug or intentional ? I know it is likely because it in the past has only been used with json call, but would it be possible to make it a more general solution ?
Just to see what happend I tried to change it to general http post content type "application/x-www-form-urlencoded", and guess what it worked But it just puts even more emphasis on my question
/Zeroniak