Hi Florent, thanks much for reporting the issue. I've made an issue for it in our bug tracking system.
Charles Charles Greer Lead Engineer MarkLogic Corporation [email protected] Cell: +1 707 318 0442 @grechaw www.marklogic.com ________________________________ From: [email protected] [[email protected]] on behalf of Florent Georges [[email protected]] Sent: Monday, September 11, 2017 2:32 AM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Wrong Content-Type when JSON on GET /v1/rest-apis/{name} Hi, The GET /v1/rest-apis/{name} endpoint, as documented on the website at https://docs.marklogic.com/REST/GET/v1/rest-apis/[name], does not return the correct Content-Type in case of JSON. In case of JSON it returns text/plain instead of application/json. In case of XML it returns the correct application/xml. Complete repro: > http -A digest -a usr:pwd :8002/v1/rest-apis/App-Services > Accept:application/json HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 157 Content-Type: text/plain; charset=UTF-8 Keep-Alive: timeout=5 Server: MarkLogic { "database": "Documents", "error-format": "compatible", "group": "Default", "modules-database": "Modules", "name": "App-Services", "port": "8000", "xdbc-enabled": "true" } > http -A digest -a usr:pwd :8002/v1/rest-apis/App-Services HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 377 Content-Type: application/xml; charset=UTF-8 Keep-Alive: timeout=5 Server: MarkLogic <rapi:rest-api xmlns:rapi="http://marklogic.com/rest-api"> <rapi:name>App-Services</rapi:name> <rapi:group>Default</rapi:group> <rapi:database>Documents</rapi:database> <rapi:modules-database>Modules</rapi:modules-database> <rapi:port>8000</rapi:port> <rapi:error-format>compatible</rapi:error-format> <rapi:xdbc-enabled>true</rapi:xdbc-enabled> </rapi:rest-api> HTH, regards, -- Florent Georges H2O Consulting http://h2o.consulting/
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
