function $HttpBackendProvider() {
  this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
    return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
  }];
}
@ngdoc service
@name $httpBackend
@requires $window
@requires $document
@requires $xhrFactory

@description
HTTP backend used by the {@link ng.$http service} that delegates to
XMLHttpRequest object or JSONP and deals with browser incompatibilities.

You should never need to use this service directly, instead use the higher-level abstractions:
{@link ng.$http $http} or {@link ngResource.$resource $resource}.

During testing this implementation is swapped with {@link ngMock.$httpBackend mock
$httpBackend} which can be trained with responses.