@alterior/http 3.11.1 → 3.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/backend.d.ts +38 -38
  2. package/dist/backend.js +38 -38
  3. package/dist/client.d.ts +2108 -2108
  4. package/dist/client.js +265 -265
  5. package/dist/client.js.map +1 -1
  6. package/dist/headers.d.ts +57 -57
  7. package/dist/headers.js +187 -187
  8. package/dist/headers.js.map +1 -1
  9. package/dist/index.d.ts +18 -18
  10. package/dist/index.js +42 -42
  11. package/dist/interceptor.d.ts +63 -63
  12. package/dist/interceptor.js +43 -43
  13. package/dist/interceptor.js.map +1 -1
  14. package/dist/module.d.ts +101 -101
  15. package/dist/module.js +188 -188
  16. package/dist/module.js.map +1 -1
  17. package/dist/params.d.ts +98 -98
  18. package/dist/params.js +184 -184
  19. package/dist/params.js.map +1 -1
  20. package/dist/request.d.ts +130 -130
  21. package/dist/request.js +260 -260
  22. package/dist/request.js.map +1 -1
  23. package/dist/response.d.ts +267 -267
  24. package/dist/response.js +165 -165
  25. package/dist/response.js.map +1 -1
  26. package/dist/server.d.ts +28 -28
  27. package/dist/server.js +119 -119
  28. package/dist/server.js.map +1 -1
  29. package/dist/test/client.test.d.ts +8 -8
  30. package/dist/test/client.test.js +163 -163
  31. package/dist/test/client.test.js.map +1 -1
  32. package/dist/test/headers.test.d.ts +1 -1
  33. package/dist/test/headers.test.js +126 -126
  34. package/dist/test/module.test.d.ts +1 -1
  35. package/dist/test/module.test.js +117 -117
  36. package/dist/test/module.test.js.map +1 -1
  37. package/dist/test/params.test.d.ts +1 -1
  38. package/dist/test/params.test.js +63 -63
  39. package/dist/test/request.test.d.ts +8 -8
  40. package/dist/test/request.test.js +159 -159
  41. package/dist/test/request.test.js.map +1 -1
  42. package/dist/test/response.test.d.ts +1 -1
  43. package/dist/test/response.test.js +79 -79
  44. package/dist/test/response.test.js.map +1 -1
  45. package/dist/test/test.d.ts +1 -1
  46. package/dist/test/test.js +16 -16
  47. package/dist/test/xhr.mock.d.ts +48 -48
  48. package/dist/test/xhr.mock.js +94 -94
  49. package/dist/test/xhr.mock.js.map +1 -1
  50. package/dist/test/xhr.test.d.ts +1 -1
  51. package/dist/test/xhr.test.js +344 -344
  52. package/dist/test/xhr.test.js.map +1 -1
  53. package/dist/test/xsrf.test.d.ts +1 -1
  54. package/dist/test/xsrf.test.js +63 -63
  55. package/dist/test/xsrf.test.js.map +1 -1
  56. package/dist/testing/api.d.ts +102 -102
  57. package/dist/testing/api.js +19 -19
  58. package/dist/testing/backend.d.ts +63 -63
  59. package/dist/testing/backend.js +141 -141
  60. package/dist/testing/backend.js.map +1 -1
  61. package/dist/testing/index.d.ts +10 -10
  62. package/dist/testing/index.js +16 -16
  63. package/dist/testing/module.d.ts +16 -16
  64. package/dist/testing/module.js +38 -38
  65. package/dist/testing/module.js.map +1 -1
  66. package/dist/testing/request.d.ts +56 -56
  67. package/dist/testing/request.js +177 -177
  68. package/dist/testing/request.js.map +1 -1
  69. package/dist/testing/request.test.d.ts +8 -8
  70. package/dist/testing/request.test.js +24 -24
  71. package/dist/xhr.d.ts +42 -42
  72. package/dist/xhr.js +298 -298
  73. package/dist/xhr.js.map +1 -1
  74. package/dist/xsrf.d.ts +37 -37
  75. package/dist/xsrf.js +55 -55
  76. package/dist/xsrf.js.map +1 -1
  77. package/dist.esm/backend.d.ts +38 -38
  78. package/dist.esm/backend.js +33 -33
  79. package/dist.esm/client.d.ts +2108 -2108
  80. package/dist.esm/client.js +262 -262
  81. package/dist.esm/client.js.map +1 -1
  82. package/dist.esm/headers.d.ts +57 -57
  83. package/dist.esm/headers.js +183 -183
  84. package/dist.esm/headers.js.map +1 -1
  85. package/dist.esm/index.d.ts +18 -18
  86. package/dist.esm/index.js +18 -18
  87. package/dist.esm/interceptor.d.ts +63 -63
  88. package/dist.esm/interceptor.js +39 -39
  89. package/dist.esm/interceptor.js.map +1 -1
  90. package/dist.esm/module.d.ts +101 -101
  91. package/dist.esm/module.js +183 -183
  92. package/dist.esm/module.js.map +1 -1
  93. package/dist.esm/params.d.ts +98 -98
  94. package/dist.esm/params.js +179 -179
  95. package/dist.esm/params.js.map +1 -1
  96. package/dist.esm/request.d.ts +130 -130
  97. package/dist.esm/request.js +256 -256
  98. package/dist.esm/request.js.map +1 -1
  99. package/dist.esm/response.d.ts +267 -267
  100. package/dist.esm/response.js +158 -158
  101. package/dist.esm/response.js.map +1 -1
  102. package/dist.esm/server.d.ts +28 -28
  103. package/dist.esm/server.js +113 -113
  104. package/dist.esm/server.js.map +1 -1
  105. package/dist.esm/test/client.test.d.ts +8 -8
  106. package/dist.esm/test/client.test.js +161 -161
  107. package/dist.esm/test/client.test.js.map +1 -1
  108. package/dist.esm/test/headers.test.d.ts +1 -1
  109. package/dist.esm/test/headers.test.js +124 -124
  110. package/dist.esm/test/module.test.d.ts +1 -1
  111. package/dist.esm/test/module.test.js +115 -115
  112. package/dist.esm/test/module.test.js.map +1 -1
  113. package/dist.esm/test/params.test.d.ts +1 -1
  114. package/dist.esm/test/params.test.js +61 -61
  115. package/dist.esm/test/request.test.d.ts +8 -8
  116. package/dist.esm/test/request.test.js +157 -157
  117. package/dist.esm/test/request.test.js.map +1 -1
  118. package/dist.esm/test/response.test.d.ts +1 -1
  119. package/dist.esm/test/response.test.js +77 -77
  120. package/dist.esm/test/response.test.js.map +1 -1
  121. package/dist.esm/test/test.d.ts +1 -1
  122. package/dist.esm/test/test.js +14 -14
  123. package/dist.esm/test/xhr.mock.d.ts +48 -48
  124. package/dist.esm/test/xhr.mock.js +88 -88
  125. package/dist.esm/test/xhr.mock.js.map +1 -1
  126. package/dist.esm/test/xhr.test.d.ts +1 -1
  127. package/dist.esm/test/xhr.test.js +342 -342
  128. package/dist.esm/test/xhr.test.js.map +1 -1
  129. package/dist.esm/test/xsrf.test.d.ts +1 -1
  130. package/dist.esm/test/xsrf.test.js +61 -61
  131. package/dist.esm/test/xsrf.test.js.map +1 -1
  132. package/dist.esm/testing/api.d.ts +102 -102
  133. package/dist.esm/testing/api.js +15 -15
  134. package/dist.esm/testing/backend.d.ts +63 -63
  135. package/dist.esm/testing/backend.js +138 -138
  136. package/dist.esm/testing/backend.js.map +1 -1
  137. package/dist.esm/testing/index.d.ts +10 -10
  138. package/dist.esm/testing/index.js +10 -10
  139. package/dist.esm/testing/module.d.ts +16 -16
  140. package/dist.esm/testing/module.js +35 -35
  141. package/dist.esm/testing/module.js.map +1 -1
  142. package/dist.esm/testing/request.d.ts +56 -56
  143. package/dist.esm/testing/request.js +173 -173
  144. package/dist.esm/testing/request.js.map +1 -1
  145. package/dist.esm/testing/request.test.d.ts +8 -8
  146. package/dist.esm/testing/request.test.js +22 -22
  147. package/dist.esm/xhr.d.ts +42 -42
  148. package/dist.esm/xhr.js +294 -294
  149. package/dist.esm/xhr.js.map +1 -1
  150. package/dist.esm/xsrf.d.ts +37 -37
  151. package/dist.esm/xsrf.js +51 -51
  152. package/dist.esm/xsrf.js.map +1 -1
  153. package/package.json +11 -11
  154. package/tsconfig.esm.tsbuildinfo +1 -0
  155. package/tsconfig.json +0 -2
  156. package/tsconfig.tsbuildinfo +1 -8046
@@ -1,64 +1,64 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { InjectionToken } from '@alterior/di';
9
- import { Observable } from 'rxjs';
10
- import { HttpHandler } from './backend';
11
- import { HttpRequest } from './request';
12
- import { HttpEvent } from './response';
13
- /**
14
- * Intercepts `HttpRequest` and handles them.
15
- *
16
- * Most interceptors will transform the outgoing request before passing it to the
17
- * next interceptor in the chain, by calling `next.handle(transformedReq)`.
18
- *
19
- * In rare cases, interceptors may wish to completely handle a request themselves,
20
- * and not delegate to the remainder of the chain. This behavior is allowed.
21
- *
22
- *
23
- */
24
- export interface HttpInterceptor {
25
- /**
26
- * Intercept an outgoing `HttpRequest` and optionally transform it or the
27
- * response.
28
- *
29
- * Typically an interceptor will transform the outgoing request before returning
30
- * `next.handle(transformedReq)`. An interceptor may choose to transform the
31
- * response event stream as well, by applying additional Rx operators on the stream
32
- * returned by `next.handle()`.
33
- *
34
- * More rarely, an interceptor may choose to completely handle the request itself,
35
- * and compose a new event stream instead of invoking `next.handle()`. This is
36
- * acceptable behavior, but keep in mind further interceptors will be skipped entirely.
37
- *
38
- * It is also rare but valid for an interceptor to return multiple responses on the
39
- * event stream for a single request.
40
- */
41
- intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
42
- }
43
- /**
44
- * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.
45
- *
46
- *
47
- */
48
- export declare class HttpInterceptorHandler implements HttpHandler {
49
- private next;
50
- private interceptor;
51
- constructor(next: HttpHandler, interceptor: HttpInterceptor);
52
- handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
53
- }
54
- /**
55
- * A multi-provider token which represents the array of `HttpInterceptor`s that
56
- * are registered.
57
- *
58
- *
59
- */
60
- export declare const HTTP_INTERCEPTORS: InjectionToken<HttpInterceptor[]>;
61
- export declare class NoopInterceptor implements HttpInterceptor {
62
- intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
63
- }
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { InjectionToken } from '@alterior/di';
9
+ import { Observable } from 'rxjs';
10
+ import { HttpHandler } from './backend';
11
+ import { HttpRequest } from './request';
12
+ import { HttpEvent } from './response';
13
+ /**
14
+ * Intercepts `HttpRequest` and handles them.
15
+ *
16
+ * Most interceptors will transform the outgoing request before passing it to the
17
+ * next interceptor in the chain, by calling `next.handle(transformedReq)`.
18
+ *
19
+ * In rare cases, interceptors may wish to completely handle a request themselves,
20
+ * and not delegate to the remainder of the chain. This behavior is allowed.
21
+ *
22
+ *
23
+ */
24
+ export interface HttpInterceptor {
25
+ /**
26
+ * Intercept an outgoing `HttpRequest` and optionally transform it or the
27
+ * response.
28
+ *
29
+ * Typically an interceptor will transform the outgoing request before returning
30
+ * `next.handle(transformedReq)`. An interceptor may choose to transform the
31
+ * response event stream as well, by applying additional Rx operators on the stream
32
+ * returned by `next.handle()`.
33
+ *
34
+ * More rarely, an interceptor may choose to completely handle the request itself,
35
+ * and compose a new event stream instead of invoking `next.handle()`. This is
36
+ * acceptable behavior, but keep in mind further interceptors will be skipped entirely.
37
+ *
38
+ * It is also rare but valid for an interceptor to return multiple responses on the
39
+ * event stream for a single request.
40
+ */
41
+ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
42
+ }
43
+ /**
44
+ * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.
45
+ *
46
+ *
47
+ */
48
+ export declare class HttpInterceptorHandler implements HttpHandler {
49
+ private next;
50
+ private interceptor;
51
+ constructor(next: HttpHandler, interceptor: HttpInterceptor);
52
+ handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
53
+ }
54
+ /**
55
+ * A multi-provider token which represents the array of `HttpInterceptor`s that
56
+ * are registered.
57
+ *
58
+ *
59
+ */
60
+ export declare const HTTP_INTERCEPTORS: InjectionToken<HttpInterceptor[]>;
61
+ export declare class NoopInterceptor implements HttpInterceptor {
62
+ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
63
+ }
64
64
  //# sourceMappingURL=interceptor.d.ts.map
@@ -1,40 +1,40 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { __decorate } from "tslib";
9
- import { Injectable, InjectionToken } from '@alterior/di';
10
- /**
11
- * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.
12
- *
13
- *
14
- */
15
- export class HttpInterceptorHandler {
16
- constructor(next, interceptor) {
17
- this.next = next;
18
- this.interceptor = interceptor;
19
- }
20
- handle(req) {
21
- return this.interceptor.intercept(req, this.next);
22
- }
23
- }
24
- /**
25
- * A multi-provider token which represents the array of `HttpInterceptor`s that
26
- * are registered.
27
- *
28
- *
29
- */
30
- export const HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');
31
- let NoopInterceptor = class NoopInterceptor {
32
- intercept(req, next) {
33
- return next.handle(req);
34
- }
35
- };
36
- NoopInterceptor = __decorate([
37
- Injectable()
38
- ], NoopInterceptor);
39
- export { NoopInterceptor };
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { __decorate } from "tslib";
9
+ import { Injectable, InjectionToken } from '@alterior/di';
10
+ /**
11
+ * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.
12
+ *
13
+ *
14
+ */
15
+ export class HttpInterceptorHandler {
16
+ constructor(next, interceptor) {
17
+ this.next = next;
18
+ this.interceptor = interceptor;
19
+ }
20
+ handle(req) {
21
+ return this.interceptor.intercept(req, this.next);
22
+ }
23
+ }
24
+ /**
25
+ * A multi-provider token which represents the array of `HttpInterceptor`s that
26
+ * are registered.
27
+ *
28
+ *
29
+ */
30
+ export const HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');
31
+ let NoopInterceptor = class NoopInterceptor {
32
+ intercept(req, next) {
33
+ return next.handle(req);
34
+ }
35
+ };
36
+ NoopInterceptor = __decorate([
37
+ Injectable()
38
+ ], NoopInterceptor);
39
+ export { NoopInterceptor };
40
40
  //# sourceMappingURL=interceptor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interceptor.js","sourceRoot":"","sources":["../src/interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,cAAc,CAAC;AAsCxD;;;;GAIG;AACH,MAAM,OAAO,sBAAsB;IACjC,YAAoB,IAAiB,EAAU,WAA4B;QAAvD,SAAI,GAAJ,IAAI,CAAa;QAAU,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAE/E,MAAM,CAAC,GAAqB;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,cAAc,CAAoB,mBAAmB,CAAC,CAAC;AAGrF,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,SAAS,CAAC,GAAqB,EAAE,IAAiB;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF,CAAA;AAJY,eAAe;IAD3B,UAAU,EAAE;GACA,eAAe,CAI3B;SAJY,eAAe"}
1
+ {"version":3,"file":"interceptor.js","sourceRoot":"","sources":["../src/interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,cAAc,CAAC;AAsCxD;;;;GAIG;AACH,MAAM,OAAO,sBAAsB;IACjC,YAAoB,IAAiB,EAAU,WAA4B;QAAvD,SAAI,GAAJ,IAAI,CAAa;QAAU,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAE/E,MAAM,CAAC,GAAqB;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,cAAc,CAAoB,mBAAmB,CAAC,CAAC;AAGrF,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,SAAS,CAAC,GAAqB,EAAE,IAAiB;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF,CAAA;AAJY,eAAe;IAD3B,UAAU,EAAE;GACA,eAAe,CAI3B"}
@@ -1,102 +1,102 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { ConfiguredModule, Injector } from '@alterior/di';
9
- import { Observable } from 'rxjs';
10
- import { HttpBackend, HttpHandler } from './backend';
11
- import { HttpInterceptor } from './interceptor';
12
- import { HttpRequest } from './request';
13
- import { HttpEvent } from './response';
14
- /**
15
- * An injectable `HttpHandler` that applies multiple interceptors
16
- * to a request before passing it to the given `HttpBackend`.
17
- *
18
- * The interceptors are loaded lazily from the injector, to allow
19
- * interceptors to themselves inject classes depending indirectly
20
- * on `HttpInterceptingHandler` itself.
21
- * @see `HttpInterceptor`
22
- */
23
- export declare class HttpInterceptingHandler implements HttpHandler {
24
- private backend;
25
- private injector;
26
- private chain;
27
- constructor(backend: HttpBackend, injector: Injector);
28
- handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
29
- }
30
- /**
31
- * Constructs an `HttpHandler` that applies interceptors
32
- * to a request before passing it to the given `HttpBackend`.
33
- *
34
- * Use as a factory function within `HttpClientModule`.
35
- *
36
- *
37
- */
38
- export declare function interceptingHandler(backend: HttpBackend, interceptors?: HttpInterceptor[] | null): HttpHandler;
39
- /**
40
- * Factory function that determines where to store JSONP callbacks.
41
- *
42
- * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist
43
- * in test environments. In that case, callbacks are stored on an anonymous object instead.
44
- *
45
- *
46
- */
47
- export declare function jsonpCallbackContext(): Object;
48
- /**
49
- * An NgModule that adds XSRF protection support to outgoing requests.
50
- *
51
- * For a server that supports a cookie-based XSRF protection system,
52
- * use directly to configure XSRF protection with the correct
53
- * cookie and header names.
54
- *
55
- * If no names are supplied, the default cookie name is `XSRF-TOKEN`
56
- * and the default header name is `X-XSRF-TOKEN`.
57
- *
58
- *
59
- */
60
- export declare class HttpClientXsrfModule {
61
- /**
62
- * Disable the default XSRF protection.
63
- */
64
- static disable(): ConfiguredModule;
65
- /**
66
- * Configure XSRF protection.
67
- * @param options An object that can specify either or both
68
- * cookie name or header name.
69
- * - Cookie name default is `XSRF-TOKEN`.
70
- * - Header name default is `X-XSRF-TOKEN`.
71
- *
72
- */
73
- static withOptions(options?: {
74
- cookieName?: string;
75
- headerName?: string;
76
- }): ConfiguredModule;
77
- }
78
- /**
79
- * An NgModule that provides the `HttpClient` and associated services.
80
- *
81
- * Interceptors can be added to the chain behind `HttpClient` by binding them
82
- * to the multiprovider for `HTTP_INTERCEPTORS`.
83
- *
84
- *
85
- */
86
- export declare class HttpClientModule {
87
- static forRoot(config?: HttpClientConfig): {
88
- $module: typeof HttpClientModule;
89
- providers: any[];
90
- };
91
- }
92
- export interface HttpClientConfig {
93
- /**
94
- * Which HTTP client implementation should be used?
95
- * Use 'server' to use the `xhr2` NPM module. Use `browser` to
96
- * use the browser-side `XMLHttpRequest`, and set to `null`
97
- * to disable loading a built-in implementation (so you can
98
- * provide your own).
99
- */
100
- platform?: 'server' | 'browser' | null;
101
- }
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { ConfiguredModule, Injector } from '@alterior/di';
9
+ import { Observable } from 'rxjs';
10
+ import { HttpBackend, HttpHandler } from './backend';
11
+ import { HttpInterceptor } from './interceptor';
12
+ import { HttpRequest } from './request';
13
+ import { HttpEvent } from './response';
14
+ /**
15
+ * An injectable `HttpHandler` that applies multiple interceptors
16
+ * to a request before passing it to the given `HttpBackend`.
17
+ *
18
+ * The interceptors are loaded lazily from the injector, to allow
19
+ * interceptors to themselves inject classes depending indirectly
20
+ * on `HttpInterceptingHandler` itself.
21
+ * @see `HttpInterceptor`
22
+ */
23
+ export declare class HttpInterceptingHandler implements HttpHandler {
24
+ private backend;
25
+ private injector;
26
+ private chain;
27
+ constructor(backend: HttpBackend, injector: Injector);
28
+ handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
29
+ }
30
+ /**
31
+ * Constructs an `HttpHandler` that applies interceptors
32
+ * to a request before passing it to the given `HttpBackend`.
33
+ *
34
+ * Use as a factory function within `HttpClientModule`.
35
+ *
36
+ *
37
+ */
38
+ export declare function interceptingHandler(backend: HttpBackend, interceptors?: HttpInterceptor[] | null): HttpHandler;
39
+ /**
40
+ * Factory function that determines where to store JSONP callbacks.
41
+ *
42
+ * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist
43
+ * in test environments. In that case, callbacks are stored on an anonymous object instead.
44
+ *
45
+ *
46
+ */
47
+ export declare function jsonpCallbackContext(): Object;
48
+ /**
49
+ * An NgModule that adds XSRF protection support to outgoing requests.
50
+ *
51
+ * For a server that supports a cookie-based XSRF protection system,
52
+ * use directly to configure XSRF protection with the correct
53
+ * cookie and header names.
54
+ *
55
+ * If no names are supplied, the default cookie name is `XSRF-TOKEN`
56
+ * and the default header name is `X-XSRF-TOKEN`.
57
+ *
58
+ *
59
+ */
60
+ export declare class HttpClientXsrfModule {
61
+ /**
62
+ * Disable the default XSRF protection.
63
+ */
64
+ static disable(): ConfiguredModule;
65
+ /**
66
+ * Configure XSRF protection.
67
+ * @param options An object that can specify either or both
68
+ * cookie name or header name.
69
+ * - Cookie name default is `XSRF-TOKEN`.
70
+ * - Header name default is `X-XSRF-TOKEN`.
71
+ *
72
+ */
73
+ static withOptions(options?: {
74
+ cookieName?: string;
75
+ headerName?: string;
76
+ }): ConfiguredModule;
77
+ }
78
+ /**
79
+ * An NgModule that provides the `HttpClient` and associated services.
80
+ *
81
+ * Interceptors can be added to the chain behind `HttpClient` by binding them
82
+ * to the multiprovider for `HTTP_INTERCEPTORS`.
83
+ *
84
+ *
85
+ */
86
+ export declare class HttpClientModule {
87
+ static forRoot(config?: HttpClientConfig): {
88
+ $module: typeof HttpClientModule;
89
+ providers: any[];
90
+ };
91
+ }
92
+ export interface HttpClientConfig {
93
+ /**
94
+ * Which HTTP client implementation should be used?
95
+ * Use 'server' to use the `xhr2` NPM module. Use `browser` to
96
+ * use the browser-side `XMLHttpRequest`, and set to `null`
97
+ * to disable loading a built-in implementation (so you can
98
+ * provide your own).
99
+ */
100
+ platform?: 'server' | 'browser' | null;
101
+ }
102
102
  //# sourceMappingURL=module.d.ts.map