Description of problem: Running curl -v -X GET -H "Content-Type:application/json" ${ZANATA_URL}rest/projects/p/${PRJ}/iterations/i/${VERSION}/r/${DOC}/translations/${LANG} returns XML instead of JSON Version-Release number of selected component (if applicable): https://github.com/zanata/zanata-server/commit/9297d202c5b0a11690d85c7161a769936274ad6c (3.6.1-SNAPSHOT) How reproducible: Always Steps to Reproduce: 1. curl -v -X GET -H "Content-Type:application/json" ${ZANATA_URL}rest/projects/p/${PRJ}/iterations/i/${VERSION}/r/${DOC}/translations/${LANG} Actual results: XML format was returned Expected results: JSON should be returned Additional info:
This bug was reproduced in both Zanata 3.5.1 (git-server-3.5.1) and Zanata 3.6.0 (git-server-3.6.0) 3.5.1: curl -k -v -X GET -H "X-Auth-User:${ZANATA_USER}" -H "X-Auth-Token:${ZANATA_KEY}" -H "Content-Type:application/json" "https://fedora.zanata.org/rest/projects/p/ibus-chewing/iterations/i/master/r/ibus-chewing/translations/zh-TW" 3.6.0: curl -k -v -X GET -H "X-Auth-User:${ZANATA_USER}" -H "X-Auth-Token:${ZANATA_KEY}" -H "Content-Type:application/json" "https://fedora.zanata.org/rest/projects/p/ibus-chewing/iterations/i/master/r/ibus-chewing/translations/zh-TW"
Patrick, given what you know about the (previous) raw rest tests for json, do you have any idea why they didn't pick up this bug?
You need to use header Accept: application/json. Content-Type is for telling the server what your request payload is (in this case GET has none). This is not a bug
Of course! Thanks, Patrick.