[BUG] several wrong output methods and media types returned from XQuery endpoints
Describe the problem
Several EOL endpoints return false output methods and media types. E.g. getWorks.xql returns plain text as stated in the Content-Type return header but in fact returns JSON.
Other endpoints like getPreferences.xql may return JSON or XML depending on an URL request parameter but will always state to return "text/html".
Lastly, there are some endpoints like getAnnotation.xql that declare an output method and serialize the data in a different way. That should IMHO be rewritten.
I'm happily volunteering to do this work if you think that is helpful.
Many thanks for spotting these inconsistencies; yes, they should be rewritten!
There may be dragons, nevertheless, in the JS methods processing the returns of the XQueries. Sometimes, in the JS processing of the response, it’s being parsed to match the intended result.
Many thanks for the heads up! I understand that the frontend functionality has to be checked thoroughly after the proposed changes to the backend.