Commit 30604c3c authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

erp5_api_style: API call set proper header for JSON Content type

parent 2064412d
...@@ -46,6 +46,7 @@ def convertTojIOAPICall(function): ...@@ -46,6 +46,7 @@ def convertTojIOAPICall(function):
Log the call, and the result of the call Log the call, and the result of the call
""" """
try: try:
self.REQUEST.response.setHeader("Content-Type", "application/json")
retval = function(self, *args, **kwd) retval = function(self, *args, **kwd)
except Unauthorized, e: except Unauthorized, e:
LOG('jIOWebSection', INFO, 'Converting Unauthorized to Unauthorized error mesage in JSON,', LOG('jIOWebSection', INFO, 'Converting Unauthorized to Unauthorized error mesage in JSON,',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment