Donald Charity
Posts: 0
Joined: Thu Feb 06, 2014 2:58 pm

Always NULL for response headers using POST in REST Services

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

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

Always NULL for response headers using POST in REST Services

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

Donald Charity
Posts: 0
Joined: Thu Feb 06, 2014 2:58 pm

Always NULL for response headers using POST in REST Services

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

Return to “Issues”