@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
package/dist/xsrf.d.ts CHANGED
@@ -1,38 +1,38 @@
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 { HttpInterceptor } from './interceptor';
12
- import { HttpRequest } from './request';
13
- import { HttpEvent } from './response';
14
- export declare const XSRF_COOKIE_NAME: InjectionToken<string>;
15
- export declare const XSRF_HEADER_NAME: InjectionToken<string>;
16
- /**
17
- * Retrieves the current XSRF token to use with the next outgoing request.
18
- *
19
- *
20
- */
21
- export declare abstract class HttpXsrfTokenExtractor {
22
- /**
23
- * Get the XSRF token to use with an outgoing request.
24
- *
25
- * Will be called for every request, so the token may change between requests.
26
- */
27
- abstract getToken(): string | null;
28
- }
29
- /**
30
- * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.
31
- */
32
- export declare class HttpXsrfInterceptor implements HttpInterceptor {
33
- private tokenService;
34
- private headerName;
35
- constructor(tokenService: HttpXsrfTokenExtractor, headerName: string);
36
- intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
37
- }
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 { HttpInterceptor } from './interceptor';
12
+ import { HttpRequest } from './request';
13
+ import { HttpEvent } from './response';
14
+ export declare const XSRF_COOKIE_NAME: InjectionToken<string>;
15
+ export declare const XSRF_HEADER_NAME: InjectionToken<string>;
16
+ /**
17
+ * Retrieves the current XSRF token to use with the next outgoing request.
18
+ *
19
+ *
20
+ */
21
+ export declare abstract class HttpXsrfTokenExtractor {
22
+ /**
23
+ * Get the XSRF token to use with an outgoing request.
24
+ *
25
+ * Will be called for every request, so the token may change between requests.
26
+ */
27
+ abstract getToken(): string | null;
28
+ }
29
+ /**
30
+ * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.
31
+ */
32
+ export declare class HttpXsrfInterceptor implements HttpInterceptor {
33
+ private tokenService;
34
+ private headerName;
35
+ constructor(tokenService: HttpXsrfTokenExtractor, headerName: string);
36
+ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
37
+ }
38
38
  //# sourceMappingURL=xsrf.d.ts.map
package/dist/xsrf.js CHANGED
@@ -1,56 +1,56 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google Inc. All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.HttpXsrfInterceptor = exports.HttpXsrfTokenExtractor = exports.XSRF_HEADER_NAME = exports.XSRF_COOKIE_NAME = void 0;
11
- const tslib_1 = require("tslib");
12
- //import {DOCUMENT, ɵparseCookieValue as parseCookieValue} from '@angular/common';
13
- const di_1 = require("@alterior/di");
14
- exports.XSRF_COOKIE_NAME = new di_1.InjectionToken('XSRF_COOKIE_NAME');
15
- exports.XSRF_HEADER_NAME = new di_1.InjectionToken('XSRF_HEADER_NAME');
16
- /**
17
- * Retrieves the current XSRF token to use with the next outgoing request.
18
- *
19
- *
20
- */
21
- class HttpXsrfTokenExtractor {
22
- }
23
- exports.HttpXsrfTokenExtractor = HttpXsrfTokenExtractor;
24
- /**
25
- * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.
26
- */
27
- let HttpXsrfInterceptor = class HttpXsrfInterceptor {
28
- constructor(tokenService, headerName) {
29
- this.tokenService = tokenService;
30
- this.headerName = headerName;
31
- }
32
- intercept(req, next) {
33
- const lcUrl = req.url.toLowerCase();
34
- // Skip both non-mutating requests and absolute URLs.
35
- // Non-mutating requests don't require a token, and absolute URLs require special handling
36
- // anyway as the cookie set
37
- // on our origin is not the same as the token expected by another origin.
38
- if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||
39
- lcUrl.startsWith('https://')) {
40
- return next.handle(req);
41
- }
42
- const token = this.tokenService.getToken();
43
- // Be careful not to overwrite an existing header of the same name.
44
- if (token !== null && !req.headers.has(this.headerName)) {
45
- req = req.clone({ headers: req.headers.set(this.headerName, token) });
46
- }
47
- return next.handle(req);
48
- }
49
- };
50
- HttpXsrfInterceptor = tslib_1.__decorate([
51
- (0, di_1.Injectable)(),
52
- tslib_1.__param(1, (0, di_1.Inject)(exports.XSRF_HEADER_NAME)),
53
- tslib_1.__metadata("design:paramtypes", [HttpXsrfTokenExtractor, String])
54
- ], HttpXsrfInterceptor);
55
- exports.HttpXsrfInterceptor = HttpXsrfInterceptor;
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google Inc. All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.HttpXsrfInterceptor = exports.HttpXsrfTokenExtractor = exports.XSRF_HEADER_NAME = exports.XSRF_COOKIE_NAME = void 0;
11
+ const tslib_1 = require("tslib");
12
+ //import {DOCUMENT, ɵparseCookieValue as parseCookieValue} from '@angular/common';
13
+ const di_1 = require("@alterior/di");
14
+ exports.XSRF_COOKIE_NAME = new di_1.InjectionToken('XSRF_COOKIE_NAME');
15
+ exports.XSRF_HEADER_NAME = new di_1.InjectionToken('XSRF_HEADER_NAME');
16
+ /**
17
+ * Retrieves the current XSRF token to use with the next outgoing request.
18
+ *
19
+ *
20
+ */
21
+ class HttpXsrfTokenExtractor {
22
+ }
23
+ exports.HttpXsrfTokenExtractor = HttpXsrfTokenExtractor;
24
+ /**
25
+ * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.
26
+ */
27
+ let HttpXsrfInterceptor = class HttpXsrfInterceptor {
28
+ constructor(tokenService, headerName) {
29
+ this.tokenService = tokenService;
30
+ this.headerName = headerName;
31
+ }
32
+ intercept(req, next) {
33
+ const lcUrl = req.url.toLowerCase();
34
+ // Skip both non-mutating requests and absolute URLs.
35
+ // Non-mutating requests don't require a token, and absolute URLs require special handling
36
+ // anyway as the cookie set
37
+ // on our origin is not the same as the token expected by another origin.
38
+ if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||
39
+ lcUrl.startsWith('https://')) {
40
+ return next.handle(req);
41
+ }
42
+ const token = this.tokenService.getToken();
43
+ // Be careful not to overwrite an existing header of the same name.
44
+ if (token !== null && !req.headers.has(this.headerName)) {
45
+ req = req.clone({ headers: req.headers.set(this.headerName, token) });
46
+ }
47
+ return next.handle(req);
48
+ }
49
+ };
50
+ exports.HttpXsrfInterceptor = HttpXsrfInterceptor;
51
+ exports.HttpXsrfInterceptor = HttpXsrfInterceptor = tslib_1.__decorate([
52
+ (0, di_1.Injectable)(),
53
+ tslib_1.__param(1, (0, di_1.Inject)(exports.XSRF_HEADER_NAME)),
54
+ tslib_1.__metadata("design:paramtypes", [HttpXsrfTokenExtractor, String])
55
+ ], HttpXsrfInterceptor);
56
56
  //# sourceMappingURL=xsrf.js.map
package/dist/xsrf.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"xsrf.js","sourceRoot":"","sources":["../src/xsrf.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,kFAAkF;AAClF,qCAAgE;AAQnD,QAAA,gBAAgB,GAAG,IAAI,mBAAc,CAAS,kBAAkB,CAAC,CAAC;AAClE,QAAA,gBAAgB,GAAG,IAAI,mBAAc,CAAS,kBAAkB,CAAC,CAAC;AAE/E;;;;GAIG;AACH,MAAsB,sBAAsB;CAO3C;AAPD,wDAOC;AAED;;GAEG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACY,YAAoC,EACV,UAAkB;QAD5C,iBAAY,GAAZ,YAAY,CAAwB;QACV,eAAU,GAAV,UAAU,CAAQ;IAAG,CAAC;IAE5D,SAAS,CAAC,GAAqB,EAAE,IAAiB;QAChD,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QACpC,qDAAqD;QACrD,0FAA0F;QAC1F,2BAA2B;QAC3B,yEAAyE;QACzE,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC;YAC5E,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACzB;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAE3C,mEAAmE;QACnE,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACvD,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,EAAC,CAAC,CAAC;SACrE;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF,CAAA;AAvBY,mBAAmB;IAD/B,IAAA,eAAU,GAAE;IAIN,mBAAA,IAAA,WAAM,EAAC,wBAAgB,CAAC,CAAA;6CADH,sBAAsB;GAFrC,mBAAmB,CAuB/B;AAvBY,kDAAmB"}
1
+ {"version":3,"file":"xsrf.js","sourceRoot":"","sources":["../src/xsrf.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,kFAAkF;AAClF,qCAAgE;AAQnD,QAAA,gBAAgB,GAAG,IAAI,mBAAc,CAAS,kBAAkB,CAAC,CAAC;AAClE,QAAA,gBAAgB,GAAG,IAAI,mBAAc,CAAS,kBAAkB,CAAC,CAAC;AAE/E;;;;GAIG;AACH,MAAsB,sBAAsB;CAO3C;AAPD,wDAOC;AAED;;GAEG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACY,YAAoC,EACV,UAAkB;QAD5C,iBAAY,GAAZ,YAAY,CAAwB;QACV,eAAU,GAAV,UAAU,CAAQ;IAAG,CAAC;IAE5D,SAAS,CAAC,GAAqB,EAAE,IAAiB;QAChD,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QACpC,qDAAqD;QACrD,0FAA0F;QAC1F,2BAA2B;QAC3B,yEAAyE;QACzE,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC;YAC5E,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAE3C,mEAAmE;QACnE,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YACxD,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,EAAC,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF,CAAA;AAvBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,eAAU,GAAE;IAIN,mBAAA,IAAA,WAAM,EAAC,wBAAgB,CAAC,CAAA;6CADH,sBAAsB;GAFrC,mBAAmB,CAuB/B"}
@@ -1,39 +1,39 @@
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 { Observable } from 'rxjs';
9
- import { HttpRequest } from './request';
10
- import { HttpEvent } from './response';
11
- /**
12
- * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
13
- * `HttpResponse`.
14
- *
15
- * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
16
- * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
17
- * `HttpBackend`.
18
- *
19
- * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
20
- *
21
- *
22
- */
23
- export declare abstract class HttpHandler {
24
- abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
25
- }
26
- /**
27
- * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
28
- *
29
- * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
30
- *
31
- * When injected, `HttpBackend` dispatches requests directly to the backend, without going
32
- * through the interceptor chain.
33
- *
34
- *
35
- */
36
- export declare abstract class HttpBackend implements HttpHandler {
37
- abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
38
- }
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 { Observable } from 'rxjs';
9
+ import { HttpRequest } from './request';
10
+ import { HttpEvent } from './response';
11
+ /**
12
+ * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
13
+ * `HttpResponse`.
14
+ *
15
+ * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
16
+ * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
17
+ * `HttpBackend`.
18
+ *
19
+ * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
20
+ *
21
+ *
22
+ */
23
+ export declare abstract class HttpHandler {
24
+ abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
25
+ }
26
+ /**
27
+ * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
28
+ *
29
+ * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
30
+ *
31
+ * When injected, `HttpBackend` dispatches requests directly to the backend, without going
32
+ * through the interceptor chain.
33
+ *
34
+ *
35
+ */
36
+ export declare abstract class HttpBackend implements HttpHandler {
37
+ abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
38
+ }
39
39
  //# sourceMappingURL=backend.d.ts.map
@@ -1,34 +1,34 @@
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
- /**
9
- * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
10
- * `HttpResponse`.
11
- *
12
- * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
13
- * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
14
- * `HttpBackend`.
15
- *
16
- * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
17
- *
18
- *
19
- */
20
- export class HttpHandler {
21
- }
22
- /**
23
- * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
24
- *
25
- * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
26
- *
27
- * When injected, `HttpBackend` dispatches requests directly to the backend, without going
28
- * through the interceptor chain.
29
- *
30
- *
31
- */
32
- export class HttpBackend {
33
- }
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
+ /**
9
+ * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
10
+ * `HttpResponse`.
11
+ *
12
+ * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
13
+ * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
14
+ * `HttpBackend`.
15
+ *
16
+ * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
17
+ *
18
+ *
19
+ */
20
+ export class HttpHandler {
21
+ }
22
+ /**
23
+ * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
24
+ *
25
+ * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
26
+ *
27
+ * When injected, `HttpBackend` dispatches requests directly to the backend, without going
28
+ * through the interceptor chain.
29
+ *
30
+ *
31
+ */
32
+ export class HttpBackend {
33
+ }
34
34
  //# sourceMappingURL=backend.js.map