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