function $HttpBackendProvider() {
  this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {
    return createHttpBackend($browser, XHR, $browser.defer, $window.angular.callbacks,
        $document[0].body, $window.location.protocol.replace(':', ''));
  }];
}
@ngdoc object
@name angular.module.ng.$httpBackend
@requires $browser
@requires $window
@requires $document

@description
HTTP backend used by the {@link angular.module.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 angular.module.ng.$http $http} or {@link angular.module.ngResource.$resource $resource}.

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