title: $httpProvider interceptors Cannot set property 'x' of undefined
body: <p>Here is the deal i want to add auth token and idx to every http request.<br>
  when i try i get a <code>TypeError: Cannot set property 'site' of undefined</code><br>
  here is the interceptor</p>
  
  <pre><code>$httpProvider.interceptors.push(function($q, $cookies,$location) {
    return {
      'request': function(config) {   
        config.data.auth ='hasAuth';
        config.data.token = $cookies.token;
        config.data.idx = $cookies.idx;
        console.log(config);
  
        return config;
      }
  
    };
  });
  </code></pre>
  
  <p>And here is the $http request.</p>
  
  <pre><code>app.controller('coolCtrl', function($scope, $http, makeUrl, $cookies){
      var info={};
      info = $cookies.eidx;
  
      var test = $http.post("https://example.com/uri/list", info )
      .success(function (data) {
          $scope.data = data
      });
  
  });
  </code></pre>
  
  <p>And the error<br>
  <code>TypeError: Cannot set property 'auth' of undefined</code></p>
  
  <p>I feel like im getting mixed up in all the promises.<br>
  Thanks in advance<br>
  -James</p>