Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I set the correct response content type when making an AJAX call and retuning JSON formatted

Oliver LimbergApr 20 2017 — edited Apr 21 2017

Hi All,

in my APEX application (APEX 5.0.4) I have different AJAX Callbacks written in PL/SQL which are called from JavaScript.

to provide a response to those calls, i return JSON formatted String using the htp.p() procedure.

When checking the response of the AJAX call, the content type is

Content-Type: text/html;charset=UTF-8

Is there any possibility to change this to

Content-Type: application/json

This needs to be achieved because we have to comply to certain specifications which we cannot change.

Thanks in advance.

This post has been answered by Pierre Yotti on Apr 20 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 19 2017
Added on Apr 20 2017
3 comments
862 views