I use a gzip json file static file on my server (actually, it's my test server) and the data i receive is always compressed.
Here is my code :
$http({
url :'app/assets/json/makes2v.json.gz',
method: "GET",
headers: { 'Accept-Encoding': 'gzip' }})
.success(function(data, status, headers, config) {
console.log(data);
});
I use angular 1.3.15 and Chrome .
In the console i have this error:
Refused to set unsafe header "Accept-Encoding"
Any help will be appreciated.
Thanks,