Skip to content

Commit c439054

Browse files
committed
feat(plugins): register plugin cancelRequest by default
1 parent f283e07 commit c439054

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/module.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
22
import { BrowserXhr, ConnectionBackend, RequestOptions, ResponseOptions, XSRFStrategy } from '@angular/http';
33
import {
4+
CancelRequestPlugin,
45
DefaultOptionsToken,
56
Events,
67
Http,
@@ -58,6 +59,11 @@ export interface TypePlugins {
5859
}
5960

6061
export const DefaultPlugins: any = [
62+
{
63+
provide: HttpPluginsToken,
64+
useClass: CancelRequestPlugin,
65+
multi: true
66+
},
6167
{
6268
provide: HttpPluginsToken,
6369
useClass: ParseResponsePlugin,

0 commit comments

Comments
 (0)