I am trying to read a json present in data.gz using angularJS's $http service. But I only get strange symbols and characters as a response. I am currently running the app locally in a nodeJS server. Am I missing something in here?
$http({
url: 'systemRes.10.gz',
method: 'GET'
})
.then(function successCallback(response) {
console.log(response.data); //shows strange characters
});
Click to view the strange characters.
Since , the file is in a local directory , setting headers to the following causes an error : Refused to set unsafe header "Accept-Encoding"
headers: { 'Accept-Encoding': 'gzip' }