title: How to add new headers to the http request in angularjs through interceptors?
body: <pre><code>var module = angular.module('timestamp-marker-example', []);
          module.factory('timestampMarker',[function() {
              var timestampMarker = {
                  request: function(config) {
                      console.log(config);
                      console.log(config.method);
                      console.log(config.url);
                     /* console.log(config.headers);*/
                      var head={
                              headers:{
                                  'X-testing':'testing'
                              },
                              method:"POST"
                      }
                      config.push(head);      
  
  
  
                      return config ;
                  },
                  response: function(response) {
  
                     return response;
                  }
              };
              return timestampMarker;
          }]);
          module.config(['$httpProvider', function($httpProvider) {
              $httpProvider.interceptors.push('timestampMarker'); 
          }]);
  
          module.controller('ExampleController', ['$scope', '$http', function($scope, $http) {
  
              $http.get('https://api.github.com/users/naorye/repos').then(function(response) {
                  console.log(response);
  
              });
          }]);
  </code></pre>
  
  <p>I want to add new headers to the request from the interceptors. How to add it? I have tried in the above code. Can anyone help  me solve this problem?</p>