@angular/common 15.2.7 → 15.2.9
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.
- package/esm2020/http/src/client.mjs +3 -3
- package/esm2020/http/src/headers.mjs +16 -10
- package/esm2020/http/src/interceptor.mjs +3 -3
- package/esm2020/http/src/jsonp.mjs +10 -10
- package/esm2020/http/src/module.mjs +12 -12
- package/esm2020/http/src/provider.mjs +16 -16
- package/esm2020/http/src/xhr.mjs +6 -6
- package/esm2020/http/src/xsrf.mjs +6 -6
- package/esm2020/http/testing/src/backend.mjs +3 -3
- package/esm2020/http/testing/src/module.mjs +4 -4
- package/esm2020/src/common_module.mjs +4 -4
- package/esm2020/src/directives/ng_class.mjs +3 -3
- package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
- package/esm2020/src/directives/ng_for_of.mjs +3 -3
- package/esm2020/src/directives/ng_if.mjs +3 -3
- package/esm2020/src/directives/ng_optimized_image/lcp_image_observer.mjs +3 -3
- package/esm2020/src/directives/ng_optimized_image/ng_optimized_image.mjs +16 -6
- package/esm2020/src/directives/ng_optimized_image/preconnect_link_checker.mjs +3 -3
- package/esm2020/src/directives/ng_optimized_image/preload-link-creator.mjs +3 -3
- package/esm2020/src/directives/ng_plural.mjs +6 -6
- package/esm2020/src/directives/ng_style.mjs +3 -3
- package/esm2020/src/directives/ng_switch.mjs +9 -9
- package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
- package/esm2020/src/dom_tokens.mjs +4 -5
- package/esm2020/src/i18n/localization.mjs +6 -6
- package/esm2020/src/location/hash_location_strategy.mjs +3 -3
- package/esm2020/src/location/location.mjs +3 -3
- package/esm2020/src/location/location_strategy.mjs +6 -6
- package/esm2020/src/location/platform_location.mjs +6 -6
- package/esm2020/src/pipes/async_pipe.mjs +3 -3
- package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
- package/esm2020/src/pipes/date_pipe.mjs +3 -3
- package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
- package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
- package/esm2020/src/pipes/json_pipe.mjs +3 -3
- package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
- package/esm2020/src/pipes/number_pipe.mjs +9 -9
- package/esm2020/src/pipes/slice_pipe.mjs +3 -3
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/location_mock.mjs +3 -3
- package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
- package/esm2020/testing/src/mock_platform_location.mjs +3 -3
- package/esm2020/upgrade/src/location_upgrade_module.mjs +4 -4
- package/fesm2015/common.mjs +129 -120
- package/fesm2015/common.mjs.map +1 -1
- package/fesm2015/http/testing.mjs +8 -8
- package/fesm2015/http.mjs +69 -63
- package/fesm2015/http.mjs.map +1 -1
- package/fesm2015/testing.mjs +10 -10
- package/fesm2015/upgrade.mjs +5 -5
- package/fesm2020/common.mjs +129 -120
- package/fesm2020/common.mjs.map +1 -1
- package/fesm2020/http/testing.mjs +8 -8
- package/fesm2020/http.mjs +69 -63
- package/fesm2020/http.mjs.map +1 -1
- package/fesm2020/testing.mjs +10 -10
- package/fesm2020/upgrade.mjs +5 -5
- package/http/index.d.ts +22 -22
- package/http/testing/index.d.ts +1 -1
- package/index.d.ts +4 -5
- package/package.json +2 -2
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.2.
|
|
2
|
+
* @license Angular v15.2.9
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -309,9 +309,9 @@ class HttpClientTestingBackend {
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
HttpClientTestingBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
313
|
-
HttpClientTestingBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
312
|
+
HttpClientTestingBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientTestingBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
313
|
+
HttpClientTestingBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientTestingBackend });
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientTestingBackend, decorators: [{
|
|
315
315
|
type: Injectable
|
|
316
316
|
}] });
|
|
317
317
|
function describeRequest(testRequest) {
|
|
@@ -337,12 +337,12 @@ function provideHttpClientTesting() {
|
|
|
337
337
|
*/
|
|
338
338
|
class HttpClientTestingModule {
|
|
339
339
|
}
|
|
340
|
-
HttpClientTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
341
|
-
HttpClientTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
342
|
-
HttpClientTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
340
|
+
HttpClientTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
341
|
+
HttpClientTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: HttpClientTestingModule, imports: [HttpClientModule] });
|
|
342
|
+
HttpClientTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientTestingModule, providers: [
|
|
343
343
|
provideHttpClientTesting(),
|
|
344
344
|
], imports: [HttpClientModule] });
|
|
345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientTestingModule, decorators: [{
|
|
346
346
|
type: NgModule,
|
|
347
347
|
args: [{
|
|
348
348
|
imports: [
|
package/fesm2015/http.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.2.
|
|
2
|
+
* @license Angular v15.2.9
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -86,14 +86,20 @@ class HttpHeaders {
|
|
|
86
86
|
assertValidHeaders(headers);
|
|
87
87
|
}
|
|
88
88
|
this.headers = new Map();
|
|
89
|
-
Object.
|
|
90
|
-
let
|
|
91
|
-
const key = name.toLowerCase();
|
|
89
|
+
Object.entries(headers).forEach(([name, values]) => {
|
|
90
|
+
let headerValues;
|
|
92
91
|
if (typeof values === 'string') {
|
|
93
|
-
|
|
92
|
+
headerValues = [values];
|
|
94
93
|
}
|
|
95
|
-
if (values
|
|
96
|
-
|
|
94
|
+
else if (typeof values === 'number') {
|
|
95
|
+
headerValues = [values.toString()];
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
headerValues = values.map((value) => value.toString());
|
|
99
|
+
}
|
|
100
|
+
if (headerValues.length > 0) {
|
|
101
|
+
const key = name.toLowerCase();
|
|
102
|
+
this.headers.set(key, headerValues);
|
|
97
103
|
this.maybeSetNormalizedName(name, key);
|
|
98
104
|
}
|
|
99
105
|
});
|
|
@@ -264,14 +270,14 @@ class HttpHeaders {
|
|
|
264
270
|
}
|
|
265
271
|
/**
|
|
266
272
|
* Verifies that the headers object has the right shape: the values
|
|
267
|
-
* must be either strings or arrays. Throws an error if an invalid
|
|
273
|
+
* must be either strings, numbers or arrays. Throws an error if an invalid
|
|
268
274
|
* header value is present.
|
|
269
275
|
*/
|
|
270
276
|
function assertValidHeaders(headers) {
|
|
271
277
|
for (const [key, value] of Object.entries(headers)) {
|
|
272
|
-
if (typeof value
|
|
278
|
+
if (!(typeof value === 'string' || typeof value === 'number') && !Array.isArray(value)) {
|
|
273
279
|
throw new Error(`Unexpected value of the \`${key}\` header provided. ` +
|
|
274
|
-
`Expecting either a string or an array, but got: \`${value}\`.`);
|
|
280
|
+
`Expecting either a string, a number or an array, but got: \`${value}\`.`);
|
|
275
281
|
}
|
|
276
282
|
}
|
|
277
283
|
}
|
|
@@ -1367,9 +1373,9 @@ class HttpClient {
|
|
|
1367
1373
|
return this.request('PUT', url, addBody(options, body));
|
|
1368
1374
|
}
|
|
1369
1375
|
}
|
|
1370
|
-
HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1371
|
-
HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1376
|
+
HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1377
|
+
HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClient });
|
|
1378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClient, decorators: [{
|
|
1373
1379
|
type: Injectable
|
|
1374
1380
|
}], ctorParameters: function () { return [{ type: HttpHandler }]; } });
|
|
1375
1381
|
|
|
@@ -1443,9 +1449,9 @@ class HttpInterceptorHandler extends HttpHandler {
|
|
|
1443
1449
|
return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest));
|
|
1444
1450
|
}
|
|
1445
1451
|
}
|
|
1446
|
-
HttpInterceptorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1447
|
-
HttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1452
|
+
HttpInterceptorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1453
|
+
HttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpInterceptorHandler });
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
|
|
1449
1455
|
type: Injectable
|
|
1450
1456
|
}], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });
|
|
1451
1457
|
|
|
@@ -1495,8 +1501,8 @@ function jsonpCallbackContext() {
|
|
|
1495
1501
|
/**
|
|
1496
1502
|
* Processes an `HttpRequest` with the JSONP method,
|
|
1497
1503
|
* by performing JSONP style requests.
|
|
1498
|
-
* @see
|
|
1499
|
-
* @see
|
|
1504
|
+
* @see {@link HttpHandler}
|
|
1505
|
+
* @see {@link HttpXhrBackend}
|
|
1500
1506
|
*
|
|
1501
1507
|
* @publicApi
|
|
1502
1508
|
*/
|
|
@@ -1648,9 +1654,9 @@ class JsonpClientBackend {
|
|
|
1648
1654
|
foreignDocument.adoptNode(script);
|
|
1649
1655
|
}
|
|
1650
1656
|
}
|
|
1651
|
-
JsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1652
|
-
JsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1657
|
+
JsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1658
|
+
JsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpClientBackend });
|
|
1659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpClientBackend, decorators: [{
|
|
1654
1660
|
type: Injectable
|
|
1655
1661
|
}], ctorParameters: function () {
|
|
1656
1662
|
return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{
|
|
@@ -1672,7 +1678,7 @@ function jsonpInterceptorFn(req, next) {
|
|
|
1672
1678
|
* Identifies requests with the method JSONP and
|
|
1673
1679
|
* shifts them to the `JsonpClientBackend`.
|
|
1674
1680
|
*
|
|
1675
|
-
* @see
|
|
1681
|
+
* @see {@link HttpInterceptor}
|
|
1676
1682
|
*
|
|
1677
1683
|
* @publicApi
|
|
1678
1684
|
*/
|
|
@@ -1691,9 +1697,9 @@ class JsonpInterceptor {
|
|
|
1691
1697
|
return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
1692
1698
|
}
|
|
1693
1699
|
}
|
|
1694
|
-
JsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1695
|
-
JsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1700
|
+
JsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1701
|
+
JsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpInterceptor });
|
|
1702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpInterceptor, decorators: [{
|
|
1697
1703
|
type: Injectable
|
|
1698
1704
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
1699
1705
|
|
|
@@ -1713,8 +1719,8 @@ function getResponseUrl(xhr) {
|
|
|
1713
1719
|
}
|
|
1714
1720
|
/**
|
|
1715
1721
|
* Uses `XMLHttpRequest` to send requests to a backend server.
|
|
1716
|
-
* @see
|
|
1717
|
-
* @see
|
|
1722
|
+
* @see {@link HttpHandler}
|
|
1723
|
+
* @see {@link JsonpClientBackend}
|
|
1718
1724
|
*
|
|
1719
1725
|
* @publicApi
|
|
1720
1726
|
*/
|
|
@@ -1962,9 +1968,9 @@ class HttpXhrBackend {
|
|
|
1962
1968
|
});
|
|
1963
1969
|
}
|
|
1964
1970
|
}
|
|
1965
|
-
HttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1966
|
-
HttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1967
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1971
|
+
HttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1972
|
+
HttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXhrBackend });
|
|
1973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXhrBackend, decorators: [{
|
|
1968
1974
|
type: Injectable
|
|
1969
1975
|
}], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });
|
|
1970
1976
|
|
|
@@ -2014,9 +2020,9 @@ class HttpXsrfCookieExtractor {
|
|
|
2014
2020
|
return this.lastToken;
|
|
2015
2021
|
}
|
|
2016
2022
|
}
|
|
2017
|
-
HttpXsrfCookieExtractor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2018
|
-
HttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2023
|
+
HttpXsrfCookieExtractor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2024
|
+
HttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfCookieExtractor });
|
|
2025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
|
|
2020
2026
|
type: Injectable
|
|
2021
2027
|
}], ctorParameters: function () {
|
|
2022
2028
|
return [{ type: undefined, decorators: [{
|
|
@@ -2059,9 +2065,9 @@ class HttpXsrfInterceptor {
|
|
|
2059
2065
|
return this.injector.runInContext(() => xsrfInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
2060
2066
|
}
|
|
2061
2067
|
}
|
|
2062
|
-
HttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2063
|
-
HttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2064
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2068
|
+
HttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2069
|
+
HttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfInterceptor });
|
|
2070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
|
|
2065
2071
|
type: Injectable
|
|
2066
2072
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
2067
2073
|
|
|
@@ -2093,12 +2099,12 @@ function makeHttpFeature(kind, providers) {
|
|
|
2093
2099
|
* feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the
|
|
2094
2100
|
* `withInterceptors(...)` feature.
|
|
2095
2101
|
*
|
|
2096
|
-
* @see withInterceptors
|
|
2097
|
-
* @see withInterceptorsFromDi
|
|
2098
|
-
* @see withXsrfConfiguration
|
|
2099
|
-
* @see withNoXsrfProtection
|
|
2100
|
-
* @see withJsonpSupport
|
|
2101
|
-
* @see withRequestsMadeViaParent
|
|
2102
|
+
* @see {@link withInterceptors}
|
|
2103
|
+
* @see {@link withInterceptorsFromDi}
|
|
2104
|
+
* @see {@link withXsrfConfiguration}
|
|
2105
|
+
* @see {@link withNoXsrfProtection}
|
|
2106
|
+
* @see {@link withJsonpSupport}
|
|
2107
|
+
* @see {@link withRequestsMadeViaParent}
|
|
2102
2108
|
*/
|
|
2103
2109
|
function provideHttpClient(...features) {
|
|
2104
2110
|
if (ngDevMode) {
|
|
@@ -2133,8 +2139,8 @@ function provideHttpClient(...features) {
|
|
|
2133
2139
|
* Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`
|
|
2134
2140
|
* instance.
|
|
2135
2141
|
*
|
|
2136
|
-
* @see HttpInterceptorFn
|
|
2137
|
-
* @see provideHttpClient
|
|
2142
|
+
* @see {@link HttpInterceptorFn}
|
|
2143
|
+
* @see {@link provideHttpClient}
|
|
2138
2144
|
* @publicApi
|
|
2139
2145
|
*/
|
|
2140
2146
|
function withInterceptors(interceptorFns) {
|
|
@@ -2154,9 +2160,9 @@ const LEGACY_INTERCEPTOR_FN = new InjectionToken('LEGACY_INTERCEPTOR_FN');
|
|
|
2154
2160
|
* Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided
|
|
2155
2161
|
* interceptors may be phased out in a later release.
|
|
2156
2162
|
*
|
|
2157
|
-
* @see HttpInterceptor
|
|
2158
|
-
* @see HTTP_INTERCEPTORS
|
|
2159
|
-
* @see provideHttpClient
|
|
2163
|
+
* @see {@link HttpInterceptor}
|
|
2164
|
+
* @see {@link HTTP_INTERCEPTORS}
|
|
2165
|
+
* @see {@link provideHttpClient}
|
|
2160
2166
|
*/
|
|
2161
2167
|
function withInterceptorsFromDi() {
|
|
2162
2168
|
// Note: the legacy interceptor function is provided here via an intermediate token
|
|
@@ -2181,7 +2187,7 @@ function withInterceptorsFromDi() {
|
|
|
2181
2187
|
*
|
|
2182
2188
|
* This feature is incompatible with the `withNoXsrfProtection` feature.
|
|
2183
2189
|
*
|
|
2184
|
-
* @see provideHttpClient
|
|
2190
|
+
* @see {@link provideHttpClient}
|
|
2185
2191
|
*/
|
|
2186
2192
|
function withXsrfConfiguration({ cookieName, headerName }) {
|
|
2187
2193
|
const providers = [];
|
|
@@ -2198,7 +2204,7 @@ function withXsrfConfiguration({ cookieName, headerName }) {
|
|
|
2198
2204
|
*
|
|
2199
2205
|
* This feature is incompatible with the `withXsrfConfiguration` feature.
|
|
2200
2206
|
*
|
|
2201
|
-
* @see provideHttpClient
|
|
2207
|
+
* @see {@link provideHttpClient}
|
|
2202
2208
|
*/
|
|
2203
2209
|
function withNoXsrfProtection() {
|
|
2204
2210
|
return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [
|
|
@@ -2211,7 +2217,7 @@ function withNoXsrfProtection() {
|
|
|
2211
2217
|
/**
|
|
2212
2218
|
* Add JSONP support to the configuration of the current `HttpClient` instance.
|
|
2213
2219
|
*
|
|
2214
|
-
* @see provideHttpClient
|
|
2220
|
+
* @see {@link provideHttpClient}
|
|
2215
2221
|
*/
|
|
2216
2222
|
function withJsonpSupport() {
|
|
2217
2223
|
return makeHttpFeature(HttpFeatureKind.JsonpSupport, [
|
|
@@ -2237,7 +2243,7 @@ function withJsonpSupport() {
|
|
|
2237
2243
|
* "bubble up" until either reaching the root level or an `HttpClient` which was not configured with
|
|
2238
2244
|
* this option.
|
|
2239
2245
|
*
|
|
2240
|
-
* @see provideHttpClient
|
|
2246
|
+
* @see {@link provideHttpClient}
|
|
2241
2247
|
* @developerPreview
|
|
2242
2248
|
*/
|
|
2243
2249
|
function withRequestsMadeViaParent() {
|
|
@@ -2294,9 +2300,9 @@ class HttpClientXsrfModule {
|
|
|
2294
2300
|
};
|
|
2295
2301
|
}
|
|
2296
2302
|
}
|
|
2297
|
-
HttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2298
|
-
HttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
2299
|
-
HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
2303
|
+
HttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2304
|
+
HttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule });
|
|
2305
|
+
HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule, providers: [
|
|
2300
2306
|
HttpXsrfInterceptor,
|
|
2301
2307
|
{ provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
|
|
2302
2308
|
{ provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
|
|
@@ -2306,7 +2312,7 @@ HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2306
2312
|
}).ɵproviders,
|
|
2307
2313
|
{ provide: XSRF_ENABLED, useValue: true },
|
|
2308
2314
|
] });
|
|
2309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
|
|
2310
2316
|
type: NgModule,
|
|
2311
2317
|
args: [{
|
|
2312
2318
|
providers: [
|
|
@@ -2332,12 +2338,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2332
2338
|
*/
|
|
2333
2339
|
class HttpClientModule {
|
|
2334
2340
|
}
|
|
2335
|
-
HttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2336
|
-
HttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
2337
|
-
HttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
2341
|
+
HttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2342
|
+
HttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule });
|
|
2343
|
+
HttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule, providers: [
|
|
2338
2344
|
provideHttpClient(withInterceptorsFromDi()),
|
|
2339
2345
|
] });
|
|
2340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule, decorators: [{
|
|
2341
2347
|
type: NgModule,
|
|
2342
2348
|
args: [{
|
|
2343
2349
|
/**
|
|
@@ -2359,12 +2365,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2359
2365
|
*/
|
|
2360
2366
|
class HttpClientJsonpModule {
|
|
2361
2367
|
}
|
|
2362
|
-
HttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2363
|
-
HttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
2364
|
-
HttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
2368
|
+
HttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2369
|
+
HttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule });
|
|
2370
|
+
HttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule, providers: [
|
|
2365
2371
|
withJsonpSupport().ɵproviders,
|
|
2366
2372
|
] });
|
|
2367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
|
|
2368
2374
|
type: NgModule,
|
|
2369
2375
|
args: [{
|
|
2370
2376
|
providers: [
|