[jQuery] $.ajax beforeSend Accept-Encoding behavior
I'm trying to make an Ajax request, specifically requesting a non-
gzipped response. Here's how I am going about it:
$.ajax({
url : 'http://my.valid.url/',
method : 'get',
beforeSend : function (xhr) {
xhr.setRequestHeader('Accept-Encoding', 'identity');
xhr.setRequestHeader('X-Test', 'foo');
}
});
Watching the action with LiveHTTPHeaders in Firefox 3, I can see that
"X-Test: foo" gets set correctly, but I'm still seeing "Accept-
Encoding: gzip,deflate". Is this expected behavior? If so, is there a
reason why I can't change the Accept-Encoding value?
Thanks,
-Andrew