@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,184 +1,184 @@
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
- var HttpClientXsrfModule_1, HttpClientModule_1;
9
- import { __decorate, __metadata } from "tslib";
10
- import { Injectable, Module, Injector } from '@alterior/di';
11
- import { HttpBackend, HttpHandler } from './backend';
12
- import { HttpClient } from './client';
13
- import { HTTP_INTERCEPTORS, HttpInterceptorHandler, NoopInterceptor } from './interceptor';
14
- import { BrowserXhr, HttpXhrBackend, XhrFactory } from './xhr';
15
- import { HttpXsrfInterceptor, XSRF_COOKIE_NAME, XSRF_HEADER_NAME } from './xsrf';
16
- import { ServerXhr, zoneWrappedInterceptingHandler } from './server';
17
- /**
18
- * An injectable `HttpHandler` that applies multiple interceptors
19
- * to a request before passing it to the given `HttpBackend`.
20
- *
21
- * The interceptors are loaded lazily from the injector, to allow
22
- * interceptors to themselves inject classes depending indirectly
23
- * on `HttpInterceptingHandler` itself.
24
- * @see `HttpInterceptor`
25
- */
26
- let HttpInterceptingHandler = class HttpInterceptingHandler {
27
- constructor(backend, injector) {
28
- this.backend = backend;
29
- this.injector = injector;
30
- this.chain = null;
31
- }
32
- handle(req) {
33
- if (this.chain === null) {
34
- const interceptors = this.injector.get(HTTP_INTERCEPTORS, []);
35
- this.chain = interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), this.backend);
36
- }
37
- return this.chain.handle(req);
38
- }
39
- };
40
- HttpInterceptingHandler = __decorate([
41
- Injectable(),
42
- __metadata("design:paramtypes", [HttpBackend, Injector])
43
- ], HttpInterceptingHandler);
44
- export { HttpInterceptingHandler };
45
- /**
46
- * Constructs an `HttpHandler` that applies interceptors
47
- * to a request before passing it to the given `HttpBackend`.
48
- *
49
- * Use as a factory function within `HttpClientModule`.
50
- *
51
- *
52
- */
53
- export function interceptingHandler(backend, interceptors = []) {
54
- if (!interceptors) {
55
- return backend;
56
- }
57
- return interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend);
58
- }
59
- /**
60
- * Factory function that determines where to store JSONP callbacks.
61
- *
62
- * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist
63
- * in test environments. In that case, callbacks are stored on an anonymous object instead.
64
- *
65
- *
66
- */
67
- export function jsonpCallbackContext() {
68
- if (typeof window === 'object') {
69
- return window;
70
- }
71
- return {};
72
- }
73
- /**
74
- * An NgModule that adds XSRF protection support to outgoing requests.
75
- *
76
- * For a server that supports a cookie-based XSRF protection system,
77
- * use directly to configure XSRF protection with the correct
78
- * cookie and header names.
79
- *
80
- * If no names are supplied, the default cookie name is `XSRF-TOKEN`
81
- * and the default header name is `X-XSRF-TOKEN`.
82
- *
83
- *
84
- */
85
- let HttpClientXsrfModule = HttpClientXsrfModule_1 = class HttpClientXsrfModule {
86
- /**
87
- * Disable the default XSRF protection.
88
- */
89
- static disable() {
90
- return {
91
- $module: HttpClientXsrfModule_1,
92
- providers: [
93
- { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },
94
- ],
95
- };
96
- }
97
- /**
98
- * Configure XSRF protection.
99
- * @param options An object that can specify either or both
100
- * cookie name or header name.
101
- * - Cookie name default is `XSRF-TOKEN`.
102
- * - Header name default is `X-XSRF-TOKEN`.
103
- *
104
- */
105
- static withOptions(options = {}) {
106
- return {
107
- $module: HttpClientXsrfModule_1,
108
- providers: [
109
- options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],
110
- options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],
111
- ],
112
- };
113
- }
114
- };
115
- HttpClientXsrfModule = HttpClientXsrfModule_1 = __decorate([
116
- Module({
117
- providers: [
118
- HttpXsrfInterceptor,
119
- { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
120
- { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },
121
- { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },
122
- ],
123
- })
124
- ], HttpClientXsrfModule);
125
- export { HttpClientXsrfModule };
126
- /**
127
- * An NgModule that provides the `HttpClient` and associated services.
128
- *
129
- * Interceptors can be added to the chain behind `HttpClient` by binding them
130
- * to the multiprovider for `HTTP_INTERCEPTORS`.
131
- *
132
- *
133
- */
134
- let HttpClientModule = HttpClientModule_1 = class HttpClientModule {
135
- static forRoot(config) {
136
- let providers = [];
137
- if (!config)
138
- config = {};
139
- if (!config.platform) {
140
- // Autodetect the backend
141
- if (typeof document !== 'undefined')
142
- config.platform = 'browser';
143
- else
144
- config.platform = 'server';
145
- }
146
- if (config.platform === 'server') {
147
- providers.push({ provide: XhrFactory, useClass: ServerXhr }, {
148
- provide: HttpHandler,
149
- useFactory: zoneWrappedInterceptingHandler,
150
- deps: [HttpBackend, Injector]
151
- });
152
- }
153
- else if (config.platform === 'browser') {
154
- // Default configuration is browser.
155
- }
156
- return { $module: HttpClientModule_1, providers };
157
- }
158
- };
159
- HttpClientModule = HttpClientModule_1 = __decorate([
160
- Module({
161
- /**
162
- * Optional configuration for XSRF protection.
163
- */
164
- imports: [
165
- // HttpClientXsrfModule.withOptions({
166
- // cookieName: 'XSRF-TOKEN',
167
- // headerName: 'X-XSRF-TOKEN',
168
- // }),
169
- ],
170
- /**
171
- * The module provides `HttpClient` itself, and supporting services.
172
- */
173
- providers: [
174
- HttpClient,
175
- { provide: HttpHandler, useClass: HttpInterceptingHandler },
176
- HttpXhrBackend,
177
- { provide: HttpBackend, useExisting: HttpXhrBackend },
178
- BrowserXhr,
179
- { provide: XhrFactory, useExisting: BrowserXhr },
180
- ],
181
- })
182
- ], HttpClientModule);
183
- export { HttpClientModule };
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
+ var HttpClientXsrfModule_1, HttpClientModule_1;
9
+ import { __decorate, __metadata } from "tslib";
10
+ import { Injectable, Module, Injector } from '@alterior/di';
11
+ import { HttpBackend, HttpHandler } from './backend';
12
+ import { HttpClient } from './client';
13
+ import { HTTP_INTERCEPTORS, HttpInterceptorHandler, NoopInterceptor } from './interceptor';
14
+ import { BrowserXhr, HttpXhrBackend, XhrFactory } from './xhr';
15
+ import { HttpXsrfInterceptor, XSRF_COOKIE_NAME, XSRF_HEADER_NAME } from './xsrf';
16
+ import { ServerXhr, zoneWrappedInterceptingHandler } from './server';
17
+ /**
18
+ * An injectable `HttpHandler` that applies multiple interceptors
19
+ * to a request before passing it to the given `HttpBackend`.
20
+ *
21
+ * The interceptors are loaded lazily from the injector, to allow
22
+ * interceptors to themselves inject classes depending indirectly
23
+ * on `HttpInterceptingHandler` itself.
24
+ * @see `HttpInterceptor`
25
+ */
26
+ let HttpInterceptingHandler = class HttpInterceptingHandler {
27
+ constructor(backend, injector) {
28
+ this.backend = backend;
29
+ this.injector = injector;
30
+ this.chain = null;
31
+ }
32
+ handle(req) {
33
+ if (this.chain === null) {
34
+ const interceptors = this.injector.get(HTTP_INTERCEPTORS, []);
35
+ this.chain = interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), this.backend);
36
+ }
37
+ return this.chain.handle(req);
38
+ }
39
+ };
40
+ HttpInterceptingHandler = __decorate([
41
+ Injectable(),
42
+ __metadata("design:paramtypes", [HttpBackend, Injector])
43
+ ], HttpInterceptingHandler);
44
+ export { HttpInterceptingHandler };
45
+ /**
46
+ * Constructs an `HttpHandler` that applies interceptors
47
+ * to a request before passing it to the given `HttpBackend`.
48
+ *
49
+ * Use as a factory function within `HttpClientModule`.
50
+ *
51
+ *
52
+ */
53
+ export function interceptingHandler(backend, interceptors = []) {
54
+ if (!interceptors) {
55
+ return backend;
56
+ }
57
+ return interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend);
58
+ }
59
+ /**
60
+ * Factory function that determines where to store JSONP callbacks.
61
+ *
62
+ * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist
63
+ * in test environments. In that case, callbacks are stored on an anonymous object instead.
64
+ *
65
+ *
66
+ */
67
+ export function jsonpCallbackContext() {
68
+ if (typeof window === 'object') {
69
+ return window;
70
+ }
71
+ return {};
72
+ }
73
+ /**
74
+ * An NgModule that adds XSRF protection support to outgoing requests.
75
+ *
76
+ * For a server that supports a cookie-based XSRF protection system,
77
+ * use directly to configure XSRF protection with the correct
78
+ * cookie and header names.
79
+ *
80
+ * If no names are supplied, the default cookie name is `XSRF-TOKEN`
81
+ * and the default header name is `X-XSRF-TOKEN`.
82
+ *
83
+ *
84
+ */
85
+ let HttpClientXsrfModule = HttpClientXsrfModule_1 = class HttpClientXsrfModule {
86
+ /**
87
+ * Disable the default XSRF protection.
88
+ */
89
+ static disable() {
90
+ return {
91
+ $module: HttpClientXsrfModule_1,
92
+ providers: [
93
+ { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },
94
+ ],
95
+ };
96
+ }
97
+ /**
98
+ * Configure XSRF protection.
99
+ * @param options An object that can specify either or both
100
+ * cookie name or header name.
101
+ * - Cookie name default is `XSRF-TOKEN`.
102
+ * - Header name default is `X-XSRF-TOKEN`.
103
+ *
104
+ */
105
+ static withOptions(options = {}) {
106
+ return {
107
+ $module: HttpClientXsrfModule_1,
108
+ providers: [
109
+ options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],
110
+ options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],
111
+ ],
112
+ };
113
+ }
114
+ };
115
+ HttpClientXsrfModule = HttpClientXsrfModule_1 = __decorate([
116
+ Module({
117
+ providers: [
118
+ HttpXsrfInterceptor,
119
+ { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
120
+ { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },
121
+ { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },
122
+ ],
123
+ })
124
+ ], HttpClientXsrfModule);
125
+ export { HttpClientXsrfModule };
126
+ /**
127
+ * An NgModule that provides the `HttpClient` and associated services.
128
+ *
129
+ * Interceptors can be added to the chain behind `HttpClient` by binding them
130
+ * to the multiprovider for `HTTP_INTERCEPTORS`.
131
+ *
132
+ *
133
+ */
134
+ let HttpClientModule = HttpClientModule_1 = class HttpClientModule {
135
+ static forRoot(config) {
136
+ let providers = [];
137
+ if (!config)
138
+ config = {};
139
+ if (!config.platform) {
140
+ // Autodetect the backend
141
+ if (typeof document !== 'undefined')
142
+ config.platform = 'browser';
143
+ else
144
+ config.platform = 'server';
145
+ }
146
+ if (config.platform === 'server') {
147
+ providers.push({ provide: XhrFactory, useClass: ServerXhr }, {
148
+ provide: HttpHandler,
149
+ useFactory: zoneWrappedInterceptingHandler,
150
+ deps: [HttpBackend, Injector]
151
+ });
152
+ }
153
+ else if (config.platform === 'browser') {
154
+ // Default configuration is browser.
155
+ }
156
+ return { $module: HttpClientModule_1, providers };
157
+ }
158
+ };
159
+ HttpClientModule = HttpClientModule_1 = __decorate([
160
+ Module({
161
+ /**
162
+ * Optional configuration for XSRF protection.
163
+ */
164
+ imports: [
165
+ // HttpClientXsrfModule.withOptions({
166
+ // cookieName: 'XSRF-TOKEN',
167
+ // headerName: 'X-XSRF-TOKEN',
168
+ // }),
169
+ ],
170
+ /**
171
+ * The module provides `HttpClient` itself, and supporting services.
172
+ */
173
+ providers: [
174
+ HttpClient,
175
+ { provide: HttpHandler, useClass: HttpInterceptingHandler },
176
+ HttpXhrBackend,
177
+ { provide: HttpBackend, useExisting: HttpXhrBackend },
178
+ BrowserXhr,
179
+ { provide: XhrFactory, useExisting: BrowserXhr },
180
+ ],
181
+ })
182
+ ], HttpClientModule);
183
+ export { HttpClientModule };
184
184
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;;AAEH,OAAO,EAAC,UAAU,EAAE,MAAM,EAAoB,QAAQ,EAAC,MAAM,cAAc,CAAC;AAG5E,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,iBAAiB,EAAmB,sBAAsB,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAG1G,OAAO,EAAC,UAAU,EAAE,cAAc,EAAE,UAAU,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAC,mBAAmB,EAA0B,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,QAAQ,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAErE;;;;;;;;GAQG;AAEI,IAAM,uBAAuB,GAA7B,MAA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,UAAU,EAAC;SAC/C;KACF,CAAC;GACW,gBAAgB,CAiC5B"}
@@ -1,99 +1,99 @@
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
- * A codec for encoding and decoding parameters in URLs.
10
- *
11
- * Used by `HttpParams`.
12
- *
13
- *
14
- **/
15
- export interface HttpParameterCodec {
16
- encodeKey(key: string): string;
17
- encodeValue(value: string): string;
18
- decodeKey(key: string): string;
19
- decodeValue(value: string): string;
20
- }
21
- /**
22
- * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to
23
- * serialize and parse URL parameter keys and values.
24
- *
25
- *
26
- */
27
- export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
28
- encodeKey(key: string): string;
29
- encodeValue(value: string): string;
30
- decodeKey(key: string): string;
31
- decodeValue(value: string): string;
32
- }
33
- /** Options used to construct an `HttpParams` instance. */
34
- export interface HttpParamsOptions {
35
- /**
36
- * String representation of the HTTP params in URL-query-string format. Mutually exclusive with
37
- * `fromObject`.
38
- */
39
- fromString?: string;
40
- /** Object map of the HTTP params. Mutally exclusive with `fromString`. */
41
- fromObject?: {
42
- [param: string]: string | string[];
43
- };
44
- /** Encoding codec used to parse and serialize the params. */
45
- encoder?: HttpParameterCodec;
46
- }
47
- /**
48
- * An HTTP request/response body that represents serialized parameters,
49
- * per the MIME type `application/x-www-form-urlencoded`.
50
- *
51
- * This class is immutable - all mutation operations return a new instance.
52
- *
53
- *
54
- */
55
- export declare class HttpParams {
56
- private map;
57
- private encoder;
58
- private updates;
59
- private cloneFrom;
60
- constructor(options?: HttpParamsOptions);
61
- /**
62
- * Check whether the body has one or more values for the given parameter name.
63
- */
64
- has(param: string): boolean;
65
- /**
66
- * Get the first value for the given parameter name, or `null` if it's not present.
67
- */
68
- get(param: string): string | null;
69
- /**
70
- * Get all values for the given parameter name, or `null` if it's not present.
71
- */
72
- getAll(param: string): string[] | null;
73
- /**
74
- * Get all the parameter names for this body.
75
- */
76
- keys(): string[];
77
- /**
78
- * Construct a new body with an appended value for the given parameter name.
79
- */
80
- append(param: string, value: string): HttpParams;
81
- /**
82
- * Construct a new body with a new value for the given parameter name.
83
- */
84
- set(param: string, value: string): HttpParams;
85
- /**
86
- * Construct a new body with either the given value for the given parameter
87
- * removed, if a value is given, or all values for the given parameter removed
88
- * if not.
89
- */
90
- delete(param: string, value?: string): HttpParams;
91
- /**
92
- * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are
93
- * separated by `&`s.
94
- */
95
- toString(): string;
96
- private clone;
97
- private init;
98
- }
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
+ * A codec for encoding and decoding parameters in URLs.
10
+ *
11
+ * Used by `HttpParams`.
12
+ *
13
+ *
14
+ **/
15
+ export interface HttpParameterCodec {
16
+ encodeKey(key: string): string;
17
+ encodeValue(value: string): string;
18
+ decodeKey(key: string): string;
19
+ decodeValue(value: string): string;
20
+ }
21
+ /**
22
+ * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to
23
+ * serialize and parse URL parameter keys and values.
24
+ *
25
+ *
26
+ */
27
+ export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
28
+ encodeKey(key: string): string;
29
+ encodeValue(value: string): string;
30
+ decodeKey(key: string): string;
31
+ decodeValue(value: string): string;
32
+ }
33
+ /** Options used to construct an `HttpParams` instance. */
34
+ export interface HttpParamsOptions {
35
+ /**
36
+ * String representation of the HTTP params in URL-query-string format. Mutually exclusive with
37
+ * `fromObject`.
38
+ */
39
+ fromString?: string;
40
+ /** Object map of the HTTP params. Mutally exclusive with `fromString`. */
41
+ fromObject?: {
42
+ [param: string]: string | string[];
43
+ };
44
+ /** Encoding codec used to parse and serialize the params. */
45
+ encoder?: HttpParameterCodec;
46
+ }
47
+ /**
48
+ * An HTTP request/response body that represents serialized parameters,
49
+ * per the MIME type `application/x-www-form-urlencoded`.
50
+ *
51
+ * This class is immutable - all mutation operations return a new instance.
52
+ *
53
+ *
54
+ */
55
+ export declare class HttpParams {
56
+ private map;
57
+ private encoder;
58
+ private updates;
59
+ private cloneFrom;
60
+ constructor(options?: HttpParamsOptions);
61
+ /**
62
+ * Check whether the body has one or more values for the given parameter name.
63
+ */
64
+ has(param: string): boolean;
65
+ /**
66
+ * Get the first value for the given parameter name, or `null` if it's not present.
67
+ */
68
+ get(param: string): string | null;
69
+ /**
70
+ * Get all values for the given parameter name, or `null` if it's not present.
71
+ */
72
+ getAll(param: string): string[] | null;
73
+ /**
74
+ * Get all the parameter names for this body.
75
+ */
76
+ keys(): string[];
77
+ /**
78
+ * Construct a new body with an appended value for the given parameter name.
79
+ */
80
+ append(param: string, value: string): HttpParams;
81
+ /**
82
+ * Construct a new body with a new value for the given parameter name.
83
+ */
84
+ set(param: string, value: string): HttpParams;
85
+ /**
86
+ * Construct a new body with either the given value for the given parameter
87
+ * removed, if a value is given, or all values for the given parameter removed
88
+ * if not.
89
+ */
90
+ delete(param: string, value?: string): HttpParams;
91
+ /**
92
+ * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are
93
+ * separated by `&`s.
94
+ */
95
+ toString(): string;
96
+ private clone;
97
+ private init;
98
+ }
99
99
  //# sourceMappingURL=params.d.ts.map