title: How to reset global Basic Authentication header in AngularJS?
body: <p>In my angular app the global <code>$http</code> headers are defined for every request, like this:</p>
  
  <pre><code>function useBasicAuth(username, hash) {
      var encoded = btoa(username + ':' + hash);
      $http.defaults.headers.common.Authorization = 'Basic ' + encoded;
  }
  </code></pre>
  
  <p>How to disable sending this information, when for example the user logs out, and the authentication is no longer required?</p>