Hello,
I think after 7 years of suffering with text\plain, Esri could finally accept the standard What is the correct JSON content type? - Stack Overflow
also when setting the content type in SOE and then calling the request with f=json i always get invalid text\plain instead of my application\json.
So pretty please with sugar on top, fix the bug
Petr
Old thread, but for anyone else googling this... At 10.6 the default is application/json:
Server Properties—ArcGIS REST API: Administer your server | ArcGIS for Developers
tldr: "defaultJsonResponseContentType—At 10.6, the default content-type for JSON and JSON with callback responses has been changed from text/plain to application/json and application/javascript, respectively. "
Marc,
My ArcGIS server install is 10.6.1 and this change doesn't seem to be working. By default I still get text/plain when requesting a json response. I tried to add "defaultJsonResponseContentType": "application/json" into my system properties as a long shot but that didn't make a difference.
Is there anything else that is needed to get the response in application/json or is this a bug and I should log it with my local distributor?
False alarm. The rest directory automatically uses f=pjson as the format which returns text/plain. Changed to f=json returns the application/json needed.