title: Parsing json in gz files from a local directory through ajax - angularJS
body: <p>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?</p>
  
  <pre><code>$http({ 
    url: 'systemRes.10.gz',
    method: 'GET'
  })
  .then(function successCallback(response) {
    console.log(response.data); //shows strange characters
  });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/wMKjI.jpg" rel="nofollow noreferrer">Click to view the strange characters.</a></p>
  
  <p>Since , the file is in a local directory , setting headers to the following causes an error : <em>Refused to set unsafe header "Accept-Encoding"</em></p>
  
  <pre><code>headers: { 'Accept-Encoding': 'gzip' }
  </code></pre>