@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/fesm2020/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
|
}
|
|
@@ -1366,9 +1372,9 @@ class HttpClient {
|
|
|
1366
1372
|
return this.request('PUT', url, addBody(options, body));
|
|
1367
1373
|
}
|
|
1368
1374
|
}
|
|
1369
|
-
HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1370
|
-
HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1375
|
+
HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1376
|
+
HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClient });
|
|
1377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClient, decorators: [{
|
|
1372
1378
|
type: Injectable
|
|
1373
1379
|
}], ctorParameters: function () { return [{ type: HttpHandler }]; } });
|
|
1374
1380
|
|
|
@@ -1441,9 +1447,9 @@ class HttpInterceptorHandler extends HttpHandler {
|
|
|
1441
1447
|
return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest));
|
|
1442
1448
|
}
|
|
1443
1449
|
}
|
|
1444
|
-
HttpInterceptorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1445
|
-
HttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1450
|
+
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 });
|
|
1451
|
+
HttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpInterceptorHandler });
|
|
1452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
|
|
1447
1453
|
type: Injectable
|
|
1448
1454
|
}], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });
|
|
1449
1455
|
|
|
@@ -1493,8 +1499,8 @@ function jsonpCallbackContext() {
|
|
|
1493
1499
|
/**
|
|
1494
1500
|
* Processes an `HttpRequest` with the JSONP method,
|
|
1495
1501
|
* by performing JSONP style requests.
|
|
1496
|
-
* @see
|
|
1497
|
-
* @see
|
|
1502
|
+
* @see {@link HttpHandler}
|
|
1503
|
+
* @see {@link HttpXhrBackend}
|
|
1498
1504
|
*
|
|
1499
1505
|
* @publicApi
|
|
1500
1506
|
*/
|
|
@@ -1646,9 +1652,9 @@ class JsonpClientBackend {
|
|
|
1646
1652
|
foreignDocument.adoptNode(script);
|
|
1647
1653
|
}
|
|
1648
1654
|
}
|
|
1649
|
-
JsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1650
|
-
JsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1655
|
+
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 });
|
|
1656
|
+
JsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpClientBackend });
|
|
1657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpClientBackend, decorators: [{
|
|
1652
1658
|
type: Injectable
|
|
1653
1659
|
}], ctorParameters: function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{
|
|
1654
1660
|
type: Inject,
|
|
@@ -1668,7 +1674,7 @@ function jsonpInterceptorFn(req, next) {
|
|
|
1668
1674
|
* Identifies requests with the method JSONP and
|
|
1669
1675
|
* shifts them to the `JsonpClientBackend`.
|
|
1670
1676
|
*
|
|
1671
|
-
* @see
|
|
1677
|
+
* @see {@link HttpInterceptor}
|
|
1672
1678
|
*
|
|
1673
1679
|
* @publicApi
|
|
1674
1680
|
*/
|
|
@@ -1687,9 +1693,9 @@ class JsonpInterceptor {
|
|
|
1687
1693
|
return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
1688
1694
|
}
|
|
1689
1695
|
}
|
|
1690
|
-
JsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1691
|
-
JsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1696
|
+
JsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1697
|
+
JsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpInterceptor });
|
|
1698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: JsonpInterceptor, decorators: [{
|
|
1693
1699
|
type: Injectable
|
|
1694
1700
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
1695
1701
|
|
|
@@ -1709,8 +1715,8 @@ function getResponseUrl(xhr) {
|
|
|
1709
1715
|
}
|
|
1710
1716
|
/**
|
|
1711
1717
|
* Uses `XMLHttpRequest` to send requests to a backend server.
|
|
1712
|
-
* @see
|
|
1713
|
-
* @see
|
|
1718
|
+
* @see {@link HttpHandler}
|
|
1719
|
+
* @see {@link JsonpClientBackend}
|
|
1714
1720
|
*
|
|
1715
1721
|
* @publicApi
|
|
1716
1722
|
*/
|
|
@@ -1958,9 +1964,9 @@ class HttpXhrBackend {
|
|
|
1958
1964
|
});
|
|
1959
1965
|
}
|
|
1960
1966
|
}
|
|
1961
|
-
HttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1962
|
-
HttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1967
|
+
HttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1968
|
+
HttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXhrBackend });
|
|
1969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXhrBackend, decorators: [{
|
|
1964
1970
|
type: Injectable
|
|
1965
1971
|
}], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });
|
|
1966
1972
|
|
|
@@ -2010,9 +2016,9 @@ class HttpXsrfCookieExtractor {
|
|
|
2010
2016
|
return this.lastToken;
|
|
2011
2017
|
}
|
|
2012
2018
|
}
|
|
2013
|
-
HttpXsrfCookieExtractor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2014
|
-
HttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2015
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2019
|
+
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 });
|
|
2020
|
+
HttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfCookieExtractor });
|
|
2021
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
|
|
2016
2022
|
type: Injectable
|
|
2017
2023
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2018
2024
|
type: Inject,
|
|
@@ -2053,9 +2059,9 @@ class HttpXsrfInterceptor {
|
|
|
2053
2059
|
return this.injector.runInContext(() => xsrfInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
2054
2060
|
}
|
|
2055
2061
|
}
|
|
2056
|
-
HttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2057
|
-
HttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
2058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2062
|
+
HttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2063
|
+
HttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfInterceptor });
|
|
2064
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
|
|
2059
2065
|
type: Injectable
|
|
2060
2066
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
2061
2067
|
|
|
@@ -2087,12 +2093,12 @@ function makeHttpFeature(kind, providers) {
|
|
|
2087
2093
|
* feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the
|
|
2088
2094
|
* `withInterceptors(...)` feature.
|
|
2089
2095
|
*
|
|
2090
|
-
* @see withInterceptors
|
|
2091
|
-
* @see withInterceptorsFromDi
|
|
2092
|
-
* @see withXsrfConfiguration
|
|
2093
|
-
* @see withNoXsrfProtection
|
|
2094
|
-
* @see withJsonpSupport
|
|
2095
|
-
* @see withRequestsMadeViaParent
|
|
2096
|
+
* @see {@link withInterceptors}
|
|
2097
|
+
* @see {@link withInterceptorsFromDi}
|
|
2098
|
+
* @see {@link withXsrfConfiguration}
|
|
2099
|
+
* @see {@link withNoXsrfProtection}
|
|
2100
|
+
* @see {@link withJsonpSupport}
|
|
2101
|
+
* @see {@link withRequestsMadeViaParent}
|
|
2096
2102
|
*/
|
|
2097
2103
|
function provideHttpClient(...features) {
|
|
2098
2104
|
if (ngDevMode) {
|
|
@@ -2127,8 +2133,8 @@ function provideHttpClient(...features) {
|
|
|
2127
2133
|
* Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`
|
|
2128
2134
|
* instance.
|
|
2129
2135
|
*
|
|
2130
|
-
* @see HttpInterceptorFn
|
|
2131
|
-
* @see provideHttpClient
|
|
2136
|
+
* @see {@link HttpInterceptorFn}
|
|
2137
|
+
* @see {@link provideHttpClient}
|
|
2132
2138
|
* @publicApi
|
|
2133
2139
|
*/
|
|
2134
2140
|
function withInterceptors(interceptorFns) {
|
|
@@ -2148,9 +2154,9 @@ const LEGACY_INTERCEPTOR_FN = new InjectionToken('LEGACY_INTERCEPTOR_FN');
|
|
|
2148
2154
|
* Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided
|
|
2149
2155
|
* interceptors may be phased out in a later release.
|
|
2150
2156
|
*
|
|
2151
|
-
* @see HttpInterceptor
|
|
2152
|
-
* @see HTTP_INTERCEPTORS
|
|
2153
|
-
* @see provideHttpClient
|
|
2157
|
+
* @see {@link HttpInterceptor}
|
|
2158
|
+
* @see {@link HTTP_INTERCEPTORS}
|
|
2159
|
+
* @see {@link provideHttpClient}
|
|
2154
2160
|
*/
|
|
2155
2161
|
function withInterceptorsFromDi() {
|
|
2156
2162
|
// Note: the legacy interceptor function is provided here via an intermediate token
|
|
@@ -2175,7 +2181,7 @@ function withInterceptorsFromDi() {
|
|
|
2175
2181
|
*
|
|
2176
2182
|
* This feature is incompatible with the `withNoXsrfProtection` feature.
|
|
2177
2183
|
*
|
|
2178
|
-
* @see provideHttpClient
|
|
2184
|
+
* @see {@link provideHttpClient}
|
|
2179
2185
|
*/
|
|
2180
2186
|
function withXsrfConfiguration({ cookieName, headerName }) {
|
|
2181
2187
|
const providers = [];
|
|
@@ -2192,7 +2198,7 @@ function withXsrfConfiguration({ cookieName, headerName }) {
|
|
|
2192
2198
|
*
|
|
2193
2199
|
* This feature is incompatible with the `withXsrfConfiguration` feature.
|
|
2194
2200
|
*
|
|
2195
|
-
* @see provideHttpClient
|
|
2201
|
+
* @see {@link provideHttpClient}
|
|
2196
2202
|
*/
|
|
2197
2203
|
function withNoXsrfProtection() {
|
|
2198
2204
|
return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [
|
|
@@ -2205,7 +2211,7 @@ function withNoXsrfProtection() {
|
|
|
2205
2211
|
/**
|
|
2206
2212
|
* Add JSONP support to the configuration of the current `HttpClient` instance.
|
|
2207
2213
|
*
|
|
2208
|
-
* @see provideHttpClient
|
|
2214
|
+
* @see {@link provideHttpClient}
|
|
2209
2215
|
*/
|
|
2210
2216
|
function withJsonpSupport() {
|
|
2211
2217
|
return makeHttpFeature(HttpFeatureKind.JsonpSupport, [
|
|
@@ -2231,7 +2237,7 @@ function withJsonpSupport() {
|
|
|
2231
2237
|
* "bubble up" until either reaching the root level or an `HttpClient` which was not configured with
|
|
2232
2238
|
* this option.
|
|
2233
2239
|
*
|
|
2234
|
-
* @see provideHttpClient
|
|
2240
|
+
* @see {@link provideHttpClient}
|
|
2235
2241
|
* @developerPreview
|
|
2236
2242
|
*/
|
|
2237
2243
|
function withRequestsMadeViaParent() {
|
|
@@ -2288,9 +2294,9 @@ class HttpClientXsrfModule {
|
|
|
2288
2294
|
};
|
|
2289
2295
|
}
|
|
2290
2296
|
}
|
|
2291
|
-
HttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2292
|
-
HttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
2293
|
-
HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
2297
|
+
HttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2298
|
+
HttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule });
|
|
2299
|
+
HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule, providers: [
|
|
2294
2300
|
HttpXsrfInterceptor,
|
|
2295
2301
|
{ provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
|
|
2296
2302
|
{ provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
|
|
@@ -2300,7 +2306,7 @@ HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2300
2306
|
}).ɵproviders,
|
|
2301
2307
|
{ provide: XSRF_ENABLED, useValue: true },
|
|
2302
2308
|
] });
|
|
2303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
|
|
2304
2310
|
type: NgModule,
|
|
2305
2311
|
args: [{
|
|
2306
2312
|
providers: [
|
|
@@ -2326,12 +2332,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2326
2332
|
*/
|
|
2327
2333
|
class HttpClientModule {
|
|
2328
2334
|
}
|
|
2329
|
-
HttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2330
|
-
HttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
2331
|
-
HttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
2335
|
+
HttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2336
|
+
HttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule });
|
|
2337
|
+
HttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule, providers: [
|
|
2332
2338
|
provideHttpClient(withInterceptorsFromDi()),
|
|
2333
2339
|
] });
|
|
2334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientModule, decorators: [{
|
|
2335
2341
|
type: NgModule,
|
|
2336
2342
|
args: [{
|
|
2337
2343
|
/**
|
|
@@ -2353,12 +2359,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2353
2359
|
*/
|
|
2354
2360
|
class HttpClientJsonpModule {
|
|
2355
2361
|
}
|
|
2356
|
-
HttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
2357
|
-
HttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
2358
|
-
HttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
2362
|
+
HttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2363
|
+
HttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule });
|
|
2364
|
+
HttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule, providers: [
|
|
2359
2365
|
withJsonpSupport().ɵproviders,
|
|
2360
2366
|
] });
|
|
2361
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
2367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
|
|
2362
2368
|
type: NgModule,
|
|
2363
2369
|
args: [{
|
|
2364
2370
|
providers: [
|