This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

HttpModule

npm Package @angular/http
Module import { HttpModule } from '@angular/http';
Source http/src/http_module.ts

Deprecation Notes

use @angular/common/http instead

Overview

      
      class HttpModule {
}
    

Description

The module that includes http's providers

Annotations

      
      @NgModule({
    providers: [
        { provide: Http, useFactory: httpFactory, deps: [XHRBackend, RequestOptions] },
        BrowserXhr,
        { provide: RequestOptions, useClass: BaseRequestOptions },
        { provide: ResponseOptions, useClass: BaseResponseOptions },
        XHRBackend,
        { provide: XSRFStrategy, useFactory: _createDefaultCookieXSRFStrategy },
    ]
})