jquery ajax: headers seem to not be working
Posted
by Will
on Stack Overflow
See other posts from Stack Overflow
or by Will
Published on 2010-02-26T18:56:35Z
Indexed on
2010/04/14
23:03 UTC
Read the original article
Hit count: 140
hello, i am trying to get the headers of an ajax request i made through jquery
$.get(url,
function(response, textStatus, headers ) {
console.log("Response: %o", response);
console.log("TextStatus: %o", textStatus);
console.log("Request: %o", headers);
}
);
this does not seem to be working however:
the response and textstatus are printing, but the "headers" object seems to be undefined
i simply want to check if it is what i expect (content type='excel', etc) or if the response type is html, i can assume the page i was calling is an error
© Stack Overflow or respective owner