title: Angular, content type is not being generated correctly when using resource
body: <p>I have tried the following command, using resource on Angular:</p>
  
  <pre class="lang-js prettyprint-override"><code>angular.module('appServices', ['ngResource']).factory('Example', 
          function($resource){
  
              return $resource('http://api.example.com.br/teste', {}, {
                  query: {method:'GET', headers: {'Content-Type': 'application/json'}}
          });
  });
  </code></pre>
  
  <p>but the http content type is not being generated correctly, in this case "application/json".</p>
  
  <p>I have seen similar questions like <a href="https://stackoverflow.com/questions/12785386/angularjs-resource-not-setting-content-type">AngularJS resource not setting Content-Type</a> ,but I have the lastest Angular version (1.0.6/1.1.4). </p>
  
  <p>What is wrong with the code above?</p>
  
  <p><strong>Conclusion</strong></p>
  
  <ul>
  <li>As mentioned bellow, HTTP Get method should not have a body. </li>
  <li>The attribute headers does not work in the version described above. I used the following command unsuccessfully:
  query: {method:'POST', headers: {'Content-Type': 'application/json'}}</li>
  <li>This way has worked for me:
  $http.defaults.headers.put['Content-Type'] = 'application/json';</li>
  </ul>