@alterior/http 3.13.3 → 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 +9 -9
  154. package/tsconfig.esm.tsbuildinfo +1 -0
  155. package/tsconfig.json +0 -2
  156. package/tsconfig.tsbuildinfo +1 -8046
package/dist/client.js CHANGED
@@ -1,266 +1,266 @@
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.HttpClient = void 0;
11
- const tslib_1 = require("tslib");
12
- const di_1 = require("@alterior/di");
13
- const rxjs_1 = require("rxjs");
14
- const operators_1 = require("rxjs/operators");
15
- const backend_1 = require("./backend");
16
- const headers_1 = require("./headers");
17
- const params_1 = require("./params");
18
- const request_1 = require("./request");
19
- const response_1 = require("./response");
20
- /**
21
- * Construct an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and
22
- * the given `body`. Basically, this clones the object and adds the body.
23
- */
24
- function addBody(options, body) {
25
- return {
26
- body,
27
- headers: options.headers,
28
- observe: options.observe,
29
- params: options.params,
30
- reportProgress: options.reportProgress,
31
- responseType: options.responseType,
32
- withCredentials: options.withCredentials,
33
- };
34
- }
35
- /**
36
- * Perform HTTP requests.
37
- *
38
- * `HttpClient` is available as an injectable class, with methods to perform HTTP requests.
39
- * Each request method has multiple signatures, and the return type varies according to which
40
- * signature is called (mainly the values of `observe` and `responseType`).
41
- *
42
- *
43
- */
44
- let HttpClient = class HttpClient {
45
- constructor(handler) {
46
- this.handler = handler;
47
- }
48
- /**
49
- * Constructs an `Observable` for a particular HTTP request that, when subscribed,
50
- * fires the request through the chain of registered interceptors and on to the
51
- * server.
52
- *
53
- * This method can be called in one of two ways. Either an `HttpRequest`
54
- * instance can be passed directly as the only parameter, or a method can be
55
- * passed as the first parameter, a string URL as the second, and an
56
- * options hash as the third.
57
- *
58
- * If a `HttpRequest` object is passed directly, an `Observable` of the
59
- * raw `HttpEvent` stream will be returned.
60
- *
61
- * If a request is instead built by providing a URL, the options object
62
- * determines the return type of `request()`. In addition to configuring
63
- * request parameters such as the outgoing headers and/or the body, the options
64
- * hash specifies two key pieces of information about the request: the
65
- * `responseType` and what to `observe`.
66
- *
67
- * The `responseType` value determines how a successful response body will be
68
- * parsed. If `responseType` is the default `json`, a type interface for the
69
- * resulting object may be passed as a type parameter to `request()`.
70
- *
71
- * The `observe` value determines the return type of `request()`, based on what
72
- * the consumer is interested in observing. A value of `events` will return an
73
- * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,
74
- * including progress events by default. A value of `response` will return an
75
- * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`
76
- * depends on the `responseType` and any optionally provided type parameter.
77
- * A value of `body` will return an `Observable<T>` with the same `T` body type.
78
- */
79
- request(first, url, options = {}) {
80
- let req;
81
- // Firstly, check whether the primary argument is an instance of `HttpRequest`.
82
- if (first instanceof request_1.HttpRequest) {
83
- // It is. The other arguments must be undefined (per the signatures) and can be
84
- // ignored.
85
- req = first;
86
- }
87
- else {
88
- // It's a string, so it represents a URL. Construct a request based on it,
89
- // and incorporate the remaining arguments (assuming GET unless a method is
90
- // provided.
91
- // Figure out the headers.
92
- let headers = undefined;
93
- if (options.headers instanceof headers_1.HttpHeaders) {
94
- headers = options.headers;
95
- }
96
- else {
97
- headers = new headers_1.HttpHeaders(options.headers);
98
- }
99
- // Sort out parameters.
100
- let params = undefined;
101
- if (!!options.params) {
102
- if (options.params instanceof params_1.HttpParams) {
103
- params = options.params;
104
- }
105
- else {
106
- params = new params_1.HttpParams({ fromObject: options.params });
107
- }
108
- }
109
- // Construct the request.
110
- req = new request_1.HttpRequest(first, url, (options.body !== undefined ? options.body : null), {
111
- headers,
112
- params,
113
- reportProgress: options.reportProgress,
114
- // By default, JSON is assumed to be returned for all calls.
115
- responseType: options.responseType || 'json',
116
- withCredentials: options.withCredentials,
117
- });
118
- }
119
- // Start with an Observable.of() the initial request, and run the handler (which
120
- // includes all interceptors) inside a concatMap(). This way, the handler runs
121
- // inside an Observable chain, which causes interceptors to be re-run on every
122
- // subscription (this also makes retries re-run the handler, including interceptors).
123
- const events$ = (0, rxjs_1.of)(req).pipe((0, operators_1.concatMap)((req) => {
124
- try {
125
- return this.handler.handle(req);
126
- }
127
- catch (e) {
128
- console.error(`Error caught while handling HTTP request:`);
129
- console.error(e);
130
- throw e;
131
- }
132
- }));
133
- // If coming via the API signature which accepts a previously constructed HttpRequest,
134
- // the only option is to get the event stream. Otherwise, return the event stream if
135
- // that is what was requested.
136
- if (first instanceof request_1.HttpRequest || options.observe === 'events') {
137
- return events$;
138
- }
139
- // The requested stream contains either the full response or the body. In either
140
- // case, the first step is to filter the event stream to extract a stream of
141
- // responses(s).
142
- const res$ = events$.pipe((0, operators_1.filter)((event) => event instanceof response_1.HttpResponse));
143
- // Decide which stream to return.
144
- switch (options.observe || 'body') {
145
- case 'body':
146
- // The requested stream is the body. Map the response stream to the response
147
- // body. This could be done more simply, but a misbehaving interceptor might
148
- // transform the response body into a different format and ignore the requested
149
- // responseType. Guard against this by validating that the response is of the
150
- // requested type.
151
- switch (req.responseType) {
152
- case 'arraybuffer':
153
- return res$.pipe((0, operators_1.map)((res) => {
154
- // Validate that the body is an ArrayBuffer.
155
- if (res.body !== null && !(res.body instanceof ArrayBuffer)) {
156
- throw new Error('Response is not an ArrayBuffer.');
157
- }
158
- return res.body;
159
- }));
160
- case 'blob':
161
- return res$.pipe((0, operators_1.map)((res) => {
162
- // Validate that the body is a Blob.
163
- if (res.body !== null && !(res.body instanceof Blob)) {
164
- throw new Error('Response is not a Blob.');
165
- }
166
- return res.body;
167
- }));
168
- case 'text':
169
- return res$.pipe((0, operators_1.map)((res) => {
170
- // Validate that the body is a string.
171
- if (res.body !== null && typeof res.body !== 'string') {
172
- throw new Error('Response is not a string.');
173
- }
174
- return res.body;
175
- }));
176
- case 'json':
177
- default:
178
- // No validation needed for JSON responses, as they can be of any type.
179
- return res$.pipe((0, operators_1.map)((res) => res.body));
180
- }
181
- case 'response':
182
- // The response stream was requested directly, so return it.
183
- return res$;
184
- default:
185
- // Guard against new future observe types being added.
186
- throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);
187
- }
188
- }
189
- /**
190
- * Constructs an `Observable` which, when subscribed, will cause the configured
191
- * DELETE request to be executed on the server. See the individual overloads for
192
- * details of `delete()`'s return type based on the provided options.
193
- */
194
- delete(url, options = {}) {
195
- return this.request('DELETE', url, options);
196
- }
197
- /**
198
- * Constructs an `Observable` which, when subscribed, will cause the configured
199
- * GET request to be executed on the server. See the individual overloads for
200
- * details of `get()`'s return type based on the provided options.
201
- */
202
- get(url, options = {}) {
203
- return this.request('GET', url, options);
204
- }
205
- /**
206
- * Constructs an `Observable` which, when subscribed, will cause the configured
207
- * HEAD request to be executed on the server. See the individual overloads for
208
- * details of `head()`'s return type based on the provided options.
209
- */
210
- head(url, options = {}) {
211
- return this.request('HEAD', url, options);
212
- }
213
- /**
214
- * Constructs an `Observable` which, when subscribed, will cause a request
215
- * with the special method `JSONP` to be dispatched via the interceptor pipeline.
216
- *
217
- * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).
218
- * If no such interceptor is reached, then the `JSONP` request will likely be
219
- * rejected by the configured backend.
220
- */
221
- jsonp(url, callbackParam) {
222
- return this.request('JSONP', url, {
223
- params: new params_1.HttpParams().append(callbackParam, 'JSONP_CALLBACK'),
224
- observe: 'body',
225
- responseType: 'json',
226
- });
227
- }
228
- /**
229
- * Constructs an `Observable` which, when subscribed, will cause the configured
230
- * OPTIONS request to be executed on the server. See the individual overloads for
231
- * details of `options()`'s return type based on the provided options.
232
- */
233
- options(url, options = {}) {
234
- return this.request('OPTIONS', url, options);
235
- }
236
- /**
237
- * Constructs an `Observable` which, when subscribed, will cause the configured
238
- * PATCH request to be executed on the server. See the individual overloads for
239
- * details of `patch()`'s return type based on the provided options.
240
- */
241
- patch(url, body, options = {}) {
242
- return this.request('PATCH', url, addBody(options, body));
243
- }
244
- /**
245
- * Constructs an `Observable` which, when subscribed, will cause the configured
246
- * POST request to be executed on the server. See the individual overloads for
247
- * details of `post()`'s return type based on the provided options.
248
- */
249
- post(url, body, options = {}) {
250
- return this.request('POST', url, addBody(options, body));
251
- }
252
- /**
253
- * Constructs an `Observable` which, when subscribed, will cause the configured
254
- * PUT request to be executed on the server. See the individual overloads for
255
- * details of `put()`'s return type based on the provided options.
256
- */
257
- put(url, body, options = {}) {
258
- return this.request('PUT', url, addBody(options, body));
259
- }
260
- };
261
- HttpClient = tslib_1.__decorate([
262
- (0, di_1.Injectable)(),
263
- tslib_1.__metadata("design:paramtypes", [backend_1.HttpHandler])
264
- ], HttpClient);
265
- exports.HttpClient = HttpClient;
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.HttpClient = void 0;
11
+ const tslib_1 = require("tslib");
12
+ const di_1 = require("@alterior/di");
13
+ const rxjs_1 = require("rxjs");
14
+ const operators_1 = require("rxjs/operators");
15
+ const backend_1 = require("./backend");
16
+ const headers_1 = require("./headers");
17
+ const params_1 = require("./params");
18
+ const request_1 = require("./request");
19
+ const response_1 = require("./response");
20
+ /**
21
+ * Construct an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and
22
+ * the given `body`. Basically, this clones the object and adds the body.
23
+ */
24
+ function addBody(options, body) {
25
+ return {
26
+ body,
27
+ headers: options.headers,
28
+ observe: options.observe,
29
+ params: options.params,
30
+ reportProgress: options.reportProgress,
31
+ responseType: options.responseType,
32
+ withCredentials: options.withCredentials,
33
+ };
34
+ }
35
+ /**
36
+ * Perform HTTP requests.
37
+ *
38
+ * `HttpClient` is available as an injectable class, with methods to perform HTTP requests.
39
+ * Each request method has multiple signatures, and the return type varies according to which
40
+ * signature is called (mainly the values of `observe` and `responseType`).
41
+ *
42
+ *
43
+ */
44
+ let HttpClient = class HttpClient {
45
+ constructor(handler) {
46
+ this.handler = handler;
47
+ }
48
+ /**
49
+ * Constructs an `Observable` for a particular HTTP request that, when subscribed,
50
+ * fires the request through the chain of registered interceptors and on to the
51
+ * server.
52
+ *
53
+ * This method can be called in one of two ways. Either an `HttpRequest`
54
+ * instance can be passed directly as the only parameter, or a method can be
55
+ * passed as the first parameter, a string URL as the second, and an
56
+ * options hash as the third.
57
+ *
58
+ * If a `HttpRequest` object is passed directly, an `Observable` of the
59
+ * raw `HttpEvent` stream will be returned.
60
+ *
61
+ * If a request is instead built by providing a URL, the options object
62
+ * determines the return type of `request()`. In addition to configuring
63
+ * request parameters such as the outgoing headers and/or the body, the options
64
+ * hash specifies two key pieces of information about the request: the
65
+ * `responseType` and what to `observe`.
66
+ *
67
+ * The `responseType` value determines how a successful response body will be
68
+ * parsed. If `responseType` is the default `json`, a type interface for the
69
+ * resulting object may be passed as a type parameter to `request()`.
70
+ *
71
+ * The `observe` value determines the return type of `request()`, based on what
72
+ * the consumer is interested in observing. A value of `events` will return an
73
+ * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,
74
+ * including progress events by default. A value of `response` will return an
75
+ * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`
76
+ * depends on the `responseType` and any optionally provided type parameter.
77
+ * A value of `body` will return an `Observable<T>` with the same `T` body type.
78
+ */
79
+ request(first, url, options = {}) {
80
+ let req;
81
+ // Firstly, check whether the primary argument is an instance of `HttpRequest`.
82
+ if (first instanceof request_1.HttpRequest) {
83
+ // It is. The other arguments must be undefined (per the signatures) and can be
84
+ // ignored.
85
+ req = first;
86
+ }
87
+ else {
88
+ // It's a string, so it represents a URL. Construct a request based on it,
89
+ // and incorporate the remaining arguments (assuming GET unless a method is
90
+ // provided.
91
+ // Figure out the headers.
92
+ let headers = undefined;
93
+ if (options.headers instanceof headers_1.HttpHeaders) {
94
+ headers = options.headers;
95
+ }
96
+ else {
97
+ headers = new headers_1.HttpHeaders(options.headers);
98
+ }
99
+ // Sort out parameters.
100
+ let params = undefined;
101
+ if (!!options.params) {
102
+ if (options.params instanceof params_1.HttpParams) {
103
+ params = options.params;
104
+ }
105
+ else {
106
+ params = new params_1.HttpParams({ fromObject: options.params });
107
+ }
108
+ }
109
+ // Construct the request.
110
+ req = new request_1.HttpRequest(first, url, (options.body !== undefined ? options.body : null), {
111
+ headers,
112
+ params,
113
+ reportProgress: options.reportProgress,
114
+ // By default, JSON is assumed to be returned for all calls.
115
+ responseType: options.responseType || 'json',
116
+ withCredentials: options.withCredentials,
117
+ });
118
+ }
119
+ // Start with an Observable.of() the initial request, and run the handler (which
120
+ // includes all interceptors) inside a concatMap(). This way, the handler runs
121
+ // inside an Observable chain, which causes interceptors to be re-run on every
122
+ // subscription (this also makes retries re-run the handler, including interceptors).
123
+ const events$ = (0, rxjs_1.of)(req).pipe((0, operators_1.concatMap)((req) => {
124
+ try {
125
+ return this.handler.handle(req);
126
+ }
127
+ catch (e) {
128
+ console.error(`Error caught while handling HTTP request:`);
129
+ console.error(e);
130
+ throw e;
131
+ }
132
+ }));
133
+ // If coming via the API signature which accepts a previously constructed HttpRequest,
134
+ // the only option is to get the event stream. Otherwise, return the event stream if
135
+ // that is what was requested.
136
+ if (first instanceof request_1.HttpRequest || options.observe === 'events') {
137
+ return events$;
138
+ }
139
+ // The requested stream contains either the full response or the body. In either
140
+ // case, the first step is to filter the event stream to extract a stream of
141
+ // responses(s).
142
+ const res$ = events$.pipe((0, operators_1.filter)((event) => event instanceof response_1.HttpResponse));
143
+ // Decide which stream to return.
144
+ switch (options.observe || 'body') {
145
+ case 'body':
146
+ // The requested stream is the body. Map the response stream to the response
147
+ // body. This could be done more simply, but a misbehaving interceptor might
148
+ // transform the response body into a different format and ignore the requested
149
+ // responseType. Guard against this by validating that the response is of the
150
+ // requested type.
151
+ switch (req.responseType) {
152
+ case 'arraybuffer':
153
+ return res$.pipe((0, operators_1.map)((res) => {
154
+ // Validate that the body is an ArrayBuffer.
155
+ if (res.body !== null && !(res.body instanceof ArrayBuffer)) {
156
+ throw new Error('Response is not an ArrayBuffer.');
157
+ }
158
+ return res.body;
159
+ }));
160
+ case 'blob':
161
+ return res$.pipe((0, operators_1.map)((res) => {
162
+ // Validate that the body is a Blob.
163
+ if (res.body !== null && !(res.body instanceof Blob)) {
164
+ throw new Error('Response is not a Blob.');
165
+ }
166
+ return res.body;
167
+ }));
168
+ case 'text':
169
+ return res$.pipe((0, operators_1.map)((res) => {
170
+ // Validate that the body is a string.
171
+ if (res.body !== null && typeof res.body !== 'string') {
172
+ throw new Error('Response is not a string.');
173
+ }
174
+ return res.body;
175
+ }));
176
+ case 'json':
177
+ default:
178
+ // No validation needed for JSON responses, as they can be of any type.
179
+ return res$.pipe((0, operators_1.map)((res) => res.body));
180
+ }
181
+ case 'response':
182
+ // The response stream was requested directly, so return it.
183
+ return res$;
184
+ default:
185
+ // Guard against new future observe types being added.
186
+ throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);
187
+ }
188
+ }
189
+ /**
190
+ * Constructs an `Observable` which, when subscribed, will cause the configured
191
+ * DELETE request to be executed on the server. See the individual overloads for
192
+ * details of `delete()`'s return type based on the provided options.
193
+ */
194
+ delete(url, options = {}) {
195
+ return this.request('DELETE', url, options);
196
+ }
197
+ /**
198
+ * Constructs an `Observable` which, when subscribed, will cause the configured
199
+ * GET request to be executed on the server. See the individual overloads for
200
+ * details of `get()`'s return type based on the provided options.
201
+ */
202
+ get(url, options = {}) {
203
+ return this.request('GET', url, options);
204
+ }
205
+ /**
206
+ * Constructs an `Observable` which, when subscribed, will cause the configured
207
+ * HEAD request to be executed on the server. See the individual overloads for
208
+ * details of `head()`'s return type based on the provided options.
209
+ */
210
+ head(url, options = {}) {
211
+ return this.request('HEAD', url, options);
212
+ }
213
+ /**
214
+ * Constructs an `Observable` which, when subscribed, will cause a request
215
+ * with the special method `JSONP` to be dispatched via the interceptor pipeline.
216
+ *
217
+ * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).
218
+ * If no such interceptor is reached, then the `JSONP` request will likely be
219
+ * rejected by the configured backend.
220
+ */
221
+ jsonp(url, callbackParam) {
222
+ return this.request('JSONP', url, {
223
+ params: new params_1.HttpParams().append(callbackParam, 'JSONP_CALLBACK'),
224
+ observe: 'body',
225
+ responseType: 'json',
226
+ });
227
+ }
228
+ /**
229
+ * Constructs an `Observable` which, when subscribed, will cause the configured
230
+ * OPTIONS request to be executed on the server. See the individual overloads for
231
+ * details of `options()`'s return type based on the provided options.
232
+ */
233
+ options(url, options = {}) {
234
+ return this.request('OPTIONS', url, options);
235
+ }
236
+ /**
237
+ * Constructs an `Observable` which, when subscribed, will cause the configured
238
+ * PATCH request to be executed on the server. See the individual overloads for
239
+ * details of `patch()`'s return type based on the provided options.
240
+ */
241
+ patch(url, body, options = {}) {
242
+ return this.request('PATCH', url, addBody(options, body));
243
+ }
244
+ /**
245
+ * Constructs an `Observable` which, when subscribed, will cause the configured
246
+ * POST request to be executed on the server. See the individual overloads for
247
+ * details of `post()`'s return type based on the provided options.
248
+ */
249
+ post(url, body, options = {}) {
250
+ return this.request('POST', url, addBody(options, body));
251
+ }
252
+ /**
253
+ * Constructs an `Observable` which, when subscribed, will cause the configured
254
+ * PUT request to be executed on the server. See the individual overloads for
255
+ * details of `put()`'s return type based on the provided options.
256
+ */
257
+ put(url, body, options = {}) {
258
+ return this.request('PUT', url, addBody(options, body));
259
+ }
260
+ };
261
+ exports.HttpClient = HttpClient;
262
+ exports.HttpClient = HttpClient = tslib_1.__decorate([
263
+ (0, di_1.Injectable)(),
264
+ tslib_1.__metadata("design:paramtypes", [backend_1.HttpHandler])
265
+ ], HttpClient);
266
266
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,qCAAwC;AACxC,+BAAqC;AACrC,8CAAsD;AAEtD,uCAAsC;AACtC,uCAAsC;AACtC,qCAAuD;AACvD,uCAAsC;AACtC,yCAAmD;AAGnD;;;GAGG;AACH,SAAS,OAAO,CACZ,OAOC,EACD,IAAc;IAChB,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,eAAe,EAAE,OAAO,CAAC,eAAe;KACzC,CAAC;AACJ,CAAC;AAID;;;;;;;;GAQG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,YAAoB,OAAoB;QAApB,YAAO,GAAP,OAAO,CAAa;IAAG,CAAC;IA8O5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,OAAO,CAAC,KAA8B,EAAE,GAAY,EAAE,UAQlD,EAAE;QACJ,IAAI,GAAqB,CAAC;QAC1B,+EA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