Page 1 of 1

Always NULL for response headers using POST in REST Services

Posted: Fri Mar 28, 2014 2:49 pm
by Donald Charity

I have a issue with POST using REST services, in the Firefox console, I can see the response headers, but I am not able to access them through the success and error calls for the service they always return null.

Here is the JS im running to get the headers:

alert(jqXHR.getResponseAllHeaders());
alert(jqXHR.getResponseHeader("DB_SUCCESS"));

Any help :)

Best


Always NULL for response headers using POST in REST Services

Posted: Fri Mar 28, 2014 3:39 pm
by Nikita

Hello,

Let's try it on service complete. jqXHR isn't passed in success. There in error really may be not those headers, that you expected


Always NULL for response headers using POST in REST Services

Posted: Fri Mar 28, 2014 10:19 pm
by Donald Charity

Fixed, had to set on my PHP page Access-Control-Allow-Headers: and list the header I needed exposed.