Get response headers cross domain
How can I get the response headers when making a cross domain request? xhr.getAllResponseHeaders() just returns null.
- $.ajax({
- url: 'http://search.twitter.com/search.atom?q=foo',
- success: function(data, textStatus, xhr){
- alert("Success:\ntextStatus: " + textStatus + "\nxhr: " + xhr.getAllResponseHeaders());
- },
- error: function(xhr, textStatus, errorThrown) {
- alert("Error:\nxhr:" + xhr.getAllResponseHeaders() + "\ntextStatus: " + textStatus + '\nerrorThrown: ' + errorThrown);
- }
- });
Thanks, hope you can help :)