title: angular $http GET request with authorization token header
body: <p>I am trying to replicate this curl using angular $http.get,</p>
  
  <pre><code>curl -H "Accept: application/json" http://localhost:3000/posts -H 'Authorization: Token token="1111"'
  </code></pre>
  
  <p>but I am not sure how to properly set the angular header</p>
  
  <p>this is how I tried it,</p>
  
  <pre><code>    app.controller('newsCtrl', function($http, $scope){
        $scope.news =[];
        $http.get('http://localhost:3000/posts.json', {
          headers: {"Authorization": "Token[token]=1111"}).success(function(response){
          console.log(response)
        })
      })
  </code></pre>
  
  <p>So how do I properly set the header?</p>
  
  <p>Thank you
  ps: I am not using Basic authentication.</p>