title: Error while accessing the $httpProvider.defaults.headers configuration object in angularJS
body: <p>I am trying to overwrite header defaults for POST requests in http header. Even i am providing $httpProvider in the function argument, but still it is throwing error. </p>
  
  <p>Code is - </p>
  
  <pre><code> angular.module('myApp.services', ['ngCookies'])
  .service('sharedProperties', function ($cookieStore, $http, $httpProvider) {
  
      $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-                              form-urlencoded;charset=utf-8';
  
   });
  </code></pre>
  
  <p>The error is -        </p>
  
  <p><strong>Error: [$injector:unpr] Unknown provider: $httpProviderProvider &lt;- $httpProvider &lt;- sharedProperties</strong></p>