angular/angular.js — pull request #872 by IgorMinar (2012-04-11 06:24:51+00:00)
Title: feat($http): expose the defaults config as $http.defaults

Often it is impossible to set the http defaults during the config phase,
because the config info is not available at this time.

A good example is authentication - often the app needs to bootstrap,
allow user to enter credentials and only then it gains access to
session token which then should be sent to the server with every request.
Without having the ability to set the defaults at runtime, the developer
either has to resort to hacks, or has to set the session token header
with every request made by the app.