@angular/common 20.0.0-next.4 → 20.0.0-next.6
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/common_module.d-1Ij4nFjY.d.ts +1947 -0
- package/fesm2022/common.mjs +29 -5287
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/common_module-Cz2TsVI9.mjs +4601 -0
- package/fesm2022/common_module-Cz2TsVI9.mjs.map +1 -0
- package/fesm2022/http/testing.mjs +12 -10
- package/fesm2022/http/testing.mjs.map +1 -1
- package/fesm2022/http.mjs +8 -2901
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/location-BeT0iJq7.mjs +637 -0
- package/fesm2022/location-BeT0iJq7.mjs.map +1 -0
- package/fesm2022/module-C4LakRc7.mjs +2903 -0
- package/fesm2022/module-C4LakRc7.mjs.map +1 -0
- package/fesm2022/platform_navigation-B45Jeakb.mjs +24 -0
- package/fesm2022/platform_navigation-B45Jeakb.mjs.map +1 -0
- package/fesm2022/testing.mjs +20 -18
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +7 -6
- package/fesm2022/upgrade.mjs.map +1 -1
- package/fesm2022/xhr-BfNfxNDv.mjs +45 -0
- package/fesm2022/xhr-BfNfxNDv.mjs.map +1 -0
- package/http/index.d.ts +30 -949
- package/http/testing/index.d.ts +5 -5
- package/index.d.ts +41 -2082
- package/module.d-CnjH8Dlt.d.ts +926 -0
- package/package.json +3 -3
- package/platform_location.d-Lbv6Ueec.d.ts +115 -0
- package/testing/index.d.ts +5 -3
- package/upgrade/index.d.ts +7 -5
- package/xhr.d-D_1kTQR5.d.ts +16 -0
package/http/index.d.ts
CHANGED
|
@@ -1,863 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.0-next.
|
|
2
|
+
* @license Angular v20.0.0-next.6
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
|
+
import { HttpRequest, HttpEvent, HttpHeaders, HttpContext, HttpParams, HttpResponse, HttpProgressEvent } from '../module.d-CnjH8Dlt.js';
|
|
9
|
+
export { HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContextToken, HttpDownloadProgressEvent, HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpParameterCodec, HttpParamsOptions, HttpResponseBase, HttpSentEvent, HttpStatusCode, HttpUploadProgressEvent, HttpUrlEncodingCodec, HttpUserEvent } from '../module.d-CnjH8Dlt.js';
|
|
8
10
|
import * as i0 from '@angular/core';
|
|
9
|
-
import { InjectionToken, EnvironmentInjector,
|
|
10
|
-
import { XhrFactory } from '
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* A token used to manipulate and access values stored in `HttpContext`.
|
|
14
|
-
*
|
|
15
|
-
* @publicApi
|
|
16
|
-
*/
|
|
17
|
-
declare class HttpContextToken<T> {
|
|
18
|
-
readonly defaultValue: () => T;
|
|
19
|
-
constructor(defaultValue: () => T);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Http context stores arbitrary user defined values and ensures type safety without
|
|
23
|
-
* actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.
|
|
24
|
-
*
|
|
25
|
-
* This context is mutable and is shared between cloned requests unless explicitly specified.
|
|
26
|
-
*
|
|
27
|
-
* @usageNotes
|
|
28
|
-
*
|
|
29
|
-
* ### Usage Example
|
|
30
|
-
*
|
|
31
|
-
* ```ts
|
|
32
|
-
* // inside cache.interceptors.ts
|
|
33
|
-
* export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);
|
|
34
|
-
*
|
|
35
|
-
* export class CacheInterceptor implements HttpInterceptor {
|
|
36
|
-
*
|
|
37
|
-
* intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {
|
|
38
|
-
* if (req.context.get(IS_CACHE_ENABLED) === true) {
|
|
39
|
-
* return ...;
|
|
40
|
-
* }
|
|
41
|
-
* return delegate.handle(req);
|
|
42
|
-
* }
|
|
43
|
-
* }
|
|
44
|
-
*
|
|
45
|
-
* // inside a service
|
|
46
|
-
*
|
|
47
|
-
* this.httpClient.get('/api/weather', {
|
|
48
|
-
* context: new HttpContext().set(IS_CACHE_ENABLED, true)
|
|
49
|
-
* }).subscribe(...);
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @publicApi
|
|
53
|
-
*/
|
|
54
|
-
declare class HttpContext {
|
|
55
|
-
private readonly map;
|
|
56
|
-
/**
|
|
57
|
-
* Store a value in the context. If a value is already present it will be overwritten.
|
|
58
|
-
*
|
|
59
|
-
* @param token The reference to an instance of `HttpContextToken`.
|
|
60
|
-
* @param value The value to store.
|
|
61
|
-
*
|
|
62
|
-
* @returns A reference to itself for easy chaining.
|
|
63
|
-
*/
|
|
64
|
-
set<T>(token: HttpContextToken<T>, value: T): HttpContext;
|
|
65
|
-
/**
|
|
66
|
-
* Retrieve the value associated with the given token.
|
|
67
|
-
*
|
|
68
|
-
* @param token The reference to an instance of `HttpContextToken`.
|
|
69
|
-
*
|
|
70
|
-
* @returns The stored value or default if one is defined.
|
|
71
|
-
*/
|
|
72
|
-
get<T>(token: HttpContextToken<T>): T;
|
|
73
|
-
/**
|
|
74
|
-
* Delete the value associated with the given token.
|
|
75
|
-
*
|
|
76
|
-
* @param token The reference to an instance of `HttpContextToken`.
|
|
77
|
-
*
|
|
78
|
-
* @returns A reference to itself for easy chaining.
|
|
79
|
-
*/
|
|
80
|
-
delete(token: HttpContextToken<unknown>): HttpContext;
|
|
81
|
-
/**
|
|
82
|
-
* Checks for existence of a given token.
|
|
83
|
-
*
|
|
84
|
-
* @param token The reference to an instance of `HttpContextToken`.
|
|
85
|
-
*
|
|
86
|
-
* @returns True if the token exists, false otherwise.
|
|
87
|
-
*/
|
|
88
|
-
has(token: HttpContextToken<unknown>): boolean;
|
|
89
|
-
/**
|
|
90
|
-
* @returns a list of tokens currently stored in the context.
|
|
91
|
-
*/
|
|
92
|
-
keys(): IterableIterator<HttpContextToken<unknown>>;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Represents the header configuration options for an HTTP request.
|
|
97
|
-
* Instances are immutable. Modifying methods return a cloned
|
|
98
|
-
* instance with the change. The original object is never changed.
|
|
99
|
-
*
|
|
100
|
-
* @publicApi
|
|
101
|
-
*/
|
|
102
|
-
declare class HttpHeaders {
|
|
103
|
-
/**
|
|
104
|
-
* Internal map of lowercase header names to values.
|
|
105
|
-
*/
|
|
106
|
-
private headers;
|
|
107
|
-
/**
|
|
108
|
-
* Internal map of lowercased header names to the normalized
|
|
109
|
-
* form of the name (the form seen first).
|
|
110
|
-
*/
|
|
111
|
-
private normalizedNames;
|
|
112
|
-
/**
|
|
113
|
-
* Complete the lazy initialization of this object (needed before reading).
|
|
114
|
-
*/
|
|
115
|
-
private lazyInit;
|
|
116
|
-
/**
|
|
117
|
-
* Queued updates to be materialized the next initialization.
|
|
118
|
-
*/
|
|
119
|
-
private lazyUpdate;
|
|
120
|
-
/** Constructs a new HTTP header object with the given values.*/
|
|
121
|
-
constructor(headers?: string | {
|
|
122
|
-
[name: string]: string | number | (string | number)[];
|
|
123
|
-
} | Headers);
|
|
124
|
-
/**
|
|
125
|
-
* Checks for existence of a given header.
|
|
126
|
-
*
|
|
127
|
-
* @param name The header name to check for existence.
|
|
128
|
-
*
|
|
129
|
-
* @returns True if the header exists, false otherwise.
|
|
130
|
-
*/
|
|
131
|
-
has(name: string): boolean;
|
|
132
|
-
/**
|
|
133
|
-
* Retrieves the first value of a given header.
|
|
134
|
-
*
|
|
135
|
-
* @param name The header name.
|
|
136
|
-
*
|
|
137
|
-
* @returns The value string if the header exists, null otherwise
|
|
138
|
-
*/
|
|
139
|
-
get(name: string): string | null;
|
|
140
|
-
/**
|
|
141
|
-
* Retrieves the names of the headers.
|
|
142
|
-
*
|
|
143
|
-
* @returns A list of header names.
|
|
144
|
-
*/
|
|
145
|
-
keys(): string[];
|
|
146
|
-
/**
|
|
147
|
-
* Retrieves a list of values for a given header.
|
|
148
|
-
*
|
|
149
|
-
* @param name The header name from which to retrieve values.
|
|
150
|
-
*
|
|
151
|
-
* @returns A string of values if the header exists, null otherwise.
|
|
152
|
-
*/
|
|
153
|
-
getAll(name: string): string[] | null;
|
|
154
|
-
/**
|
|
155
|
-
* Appends a new value to the existing set of values for a header
|
|
156
|
-
* and returns them in a clone of the original instance.
|
|
157
|
-
*
|
|
158
|
-
* @param name The header name for which to append the values.
|
|
159
|
-
* @param value The value to append.
|
|
160
|
-
*
|
|
161
|
-
* @returns A clone of the HTTP headers object with the value appended to the given header.
|
|
162
|
-
*/
|
|
163
|
-
append(name: string, value: string | string[]): HttpHeaders;
|
|
164
|
-
/**
|
|
165
|
-
* Sets or modifies a value for a given header in a clone of the original instance.
|
|
166
|
-
* If the header already exists, its value is replaced with the given value
|
|
167
|
-
* in the returned object.
|
|
168
|
-
*
|
|
169
|
-
* @param name The header name.
|
|
170
|
-
* @param value The value or values to set or override for the given header.
|
|
171
|
-
*
|
|
172
|
-
* @returns A clone of the HTTP headers object with the newly set header value.
|
|
173
|
-
*/
|
|
174
|
-
set(name: string, value: string | string[]): HttpHeaders;
|
|
175
|
-
/**
|
|
176
|
-
* Deletes values for a given header in a clone of the original instance.
|
|
177
|
-
*
|
|
178
|
-
* @param name The header name.
|
|
179
|
-
* @param value The value or values to delete for the given header.
|
|
180
|
-
*
|
|
181
|
-
* @returns A clone of the HTTP headers object with the given value deleted.
|
|
182
|
-
*/
|
|
183
|
-
delete(name: string, value?: string | string[]): HttpHeaders;
|
|
184
|
-
private maybeSetNormalizedName;
|
|
185
|
-
private init;
|
|
186
|
-
private copyFrom;
|
|
187
|
-
private clone;
|
|
188
|
-
private applyUpdate;
|
|
189
|
-
private addHeaderEntry;
|
|
190
|
-
private setHeaderEntries;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* A codec for encoding and decoding parameters in URLs.
|
|
195
|
-
*
|
|
196
|
-
* Used by `HttpParams`.
|
|
197
|
-
*
|
|
198
|
-
* @publicApi
|
|
199
|
-
**/
|
|
200
|
-
interface HttpParameterCodec {
|
|
201
|
-
encodeKey(key: string): string;
|
|
202
|
-
encodeValue(value: string): string;
|
|
203
|
-
decodeKey(key: string): string;
|
|
204
|
-
decodeValue(value: string): string;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Provides encoding and decoding of URL parameter and query-string values.
|
|
208
|
-
*
|
|
209
|
-
* Serializes and parses URL parameter keys and values to encode and decode them.
|
|
210
|
-
* If you pass URL query parameters without encoding,
|
|
211
|
-
* the query parameters can be misinterpreted at the receiving end.
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* @publicApi
|
|
215
|
-
*/
|
|
216
|
-
declare class HttpUrlEncodingCodec implements HttpParameterCodec {
|
|
217
|
-
/**
|
|
218
|
-
* Encodes a key name for a URL parameter or query-string.
|
|
219
|
-
* @param key The key name.
|
|
220
|
-
* @returns The encoded key name.
|
|
221
|
-
*/
|
|
222
|
-
encodeKey(key: string): string;
|
|
223
|
-
/**
|
|
224
|
-
* Encodes the value of a URL parameter or query-string.
|
|
225
|
-
* @param value The value.
|
|
226
|
-
* @returns The encoded value.
|
|
227
|
-
*/
|
|
228
|
-
encodeValue(value: string): string;
|
|
229
|
-
/**
|
|
230
|
-
* Decodes an encoded URL parameter or query-string key.
|
|
231
|
-
* @param key The encoded key name.
|
|
232
|
-
* @returns The decoded key name.
|
|
233
|
-
*/
|
|
234
|
-
decodeKey(key: string): string;
|
|
235
|
-
/**
|
|
236
|
-
* Decodes an encoded URL parameter or query-string value.
|
|
237
|
-
* @param value The encoded value.
|
|
238
|
-
* @returns The decoded value.
|
|
239
|
-
*/
|
|
240
|
-
decodeValue(value: string): string;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Options used to construct an `HttpParams` instance.
|
|
244
|
-
*
|
|
245
|
-
* @publicApi
|
|
246
|
-
*/
|
|
247
|
-
interface HttpParamsOptions {
|
|
248
|
-
/**
|
|
249
|
-
* String representation of the HTTP parameters in URL-query-string format.
|
|
250
|
-
* Mutually exclusive with `fromObject`.
|
|
251
|
-
*/
|
|
252
|
-
fromString?: string;
|
|
253
|
-
/** Object map of the HTTP parameters. Mutually exclusive with `fromString`. */
|
|
254
|
-
fromObject?: {
|
|
255
|
-
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
256
|
-
};
|
|
257
|
-
/** Encoding codec used to parse and serialize the parameters. */
|
|
258
|
-
encoder?: HttpParameterCodec;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* An HTTP request/response body that represents serialized parameters,
|
|
262
|
-
* per the MIME type `application/x-www-form-urlencoded`.
|
|
263
|
-
*
|
|
264
|
-
* This class is immutable; all mutation operations return a new instance.
|
|
265
|
-
*
|
|
266
|
-
* @publicApi
|
|
267
|
-
*/
|
|
268
|
-
declare class HttpParams {
|
|
269
|
-
private map;
|
|
270
|
-
private encoder;
|
|
271
|
-
private updates;
|
|
272
|
-
private cloneFrom;
|
|
273
|
-
constructor(options?: HttpParamsOptions);
|
|
274
|
-
/**
|
|
275
|
-
* Reports whether the body includes one or more values for a given parameter.
|
|
276
|
-
* @param param The parameter name.
|
|
277
|
-
* @returns True if the parameter has one or more values,
|
|
278
|
-
* false if it has no value or is not present.
|
|
279
|
-
*/
|
|
280
|
-
has(param: string): boolean;
|
|
281
|
-
/**
|
|
282
|
-
* Retrieves the first value for a parameter.
|
|
283
|
-
* @param param The parameter name.
|
|
284
|
-
* @returns The first value of the given parameter,
|
|
285
|
-
* or `null` if the parameter is not present.
|
|
286
|
-
*/
|
|
287
|
-
get(param: string): string | null;
|
|
288
|
-
/**
|
|
289
|
-
* Retrieves all values for a parameter.
|
|
290
|
-
* @param param The parameter name.
|
|
291
|
-
* @returns All values in a string array,
|
|
292
|
-
* or `null` if the parameter not present.
|
|
293
|
-
*/
|
|
294
|
-
getAll(param: string): string[] | null;
|
|
295
|
-
/**
|
|
296
|
-
* Retrieves all the parameters for this body.
|
|
297
|
-
* @returns The parameter names in a string array.
|
|
298
|
-
*/
|
|
299
|
-
keys(): string[];
|
|
300
|
-
/**
|
|
301
|
-
* Appends a new value to existing values for a parameter.
|
|
302
|
-
* @param param The parameter name.
|
|
303
|
-
* @param value The new value to add.
|
|
304
|
-
* @return A new body with the appended value.
|
|
305
|
-
*/
|
|
306
|
-
append(param: string, value: string | number | boolean): HttpParams;
|
|
307
|
-
/**
|
|
308
|
-
* Constructs a new body with appended values for the given parameter name.
|
|
309
|
-
* @param params parameters and values
|
|
310
|
-
* @return A new body with the new value.
|
|
311
|
-
*/
|
|
312
|
-
appendAll(params: {
|
|
313
|
-
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
314
|
-
}): HttpParams;
|
|
315
|
-
/**
|
|
316
|
-
* Replaces the value for a parameter.
|
|
317
|
-
* @param param The parameter name.
|
|
318
|
-
* @param value The new value.
|
|
319
|
-
* @return A new body with the new value.
|
|
320
|
-
*/
|
|
321
|
-
set(param: string, value: string | number | boolean): HttpParams;
|
|
322
|
-
/**
|
|
323
|
-
* Removes a given value or all values from a parameter.
|
|
324
|
-
* @param param The parameter name.
|
|
325
|
-
* @param value The value to remove, if provided.
|
|
326
|
-
* @return A new body with the given value removed, or with all values
|
|
327
|
-
* removed if no value is specified.
|
|
328
|
-
*/
|
|
329
|
-
delete(param: string, value?: string | number | boolean): HttpParams;
|
|
330
|
-
/**
|
|
331
|
-
* Serializes the body to an encoded string, where key-value pairs (separated by `=`) are
|
|
332
|
-
* separated by `&`s.
|
|
333
|
-
*/
|
|
334
|
-
toString(): string;
|
|
335
|
-
private clone;
|
|
336
|
-
private init;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* An outgoing HTTP request with an optional typed body.
|
|
341
|
-
*
|
|
342
|
-
* `HttpRequest` represents an outgoing request, including URL, method,
|
|
343
|
-
* headers, body, and other request configuration options. Instances should be
|
|
344
|
-
* assumed to be immutable. To modify a `HttpRequest`, the `clone`
|
|
345
|
-
* method should be used.
|
|
346
|
-
*
|
|
347
|
-
* @publicApi
|
|
348
|
-
*/
|
|
349
|
-
declare class HttpRequest<T> {
|
|
350
|
-
readonly url: string;
|
|
351
|
-
/**
|
|
352
|
-
* The request body, or `null` if one isn't set.
|
|
353
|
-
*
|
|
354
|
-
* Bodies are not enforced to be immutable, as they can include a reference to any
|
|
355
|
-
* user-defined data type. However, interceptors should take care to preserve
|
|
356
|
-
* idempotence by treating them as such.
|
|
357
|
-
*/
|
|
358
|
-
readonly body: T | null;
|
|
359
|
-
/**
|
|
360
|
-
* Outgoing headers for this request.
|
|
361
|
-
*/
|
|
362
|
-
readonly headers: HttpHeaders;
|
|
363
|
-
/**
|
|
364
|
-
* Shared and mutable context that can be used by interceptors
|
|
365
|
-
*/
|
|
366
|
-
readonly context: HttpContext;
|
|
367
|
-
/**
|
|
368
|
-
* Whether this request should be made in a way that exposes progress events.
|
|
369
|
-
*
|
|
370
|
-
* Progress events are expensive (change detection runs on each event) and so
|
|
371
|
-
* they should only be requested if the consumer intends to monitor them.
|
|
372
|
-
*
|
|
373
|
-
* Note: The `FetchBackend` doesn't support progress report on uploads.
|
|
374
|
-
*/
|
|
375
|
-
readonly reportProgress: boolean;
|
|
376
|
-
/**
|
|
377
|
-
* Whether this request should be sent with outgoing credentials (cookies).
|
|
378
|
-
*/
|
|
379
|
-
readonly withCredentials: boolean;
|
|
380
|
-
/**
|
|
381
|
-
* The expected response type of the server.
|
|
382
|
-
*
|
|
383
|
-
* This is used to parse the response appropriately before returning it to
|
|
384
|
-
* the requestee.
|
|
385
|
-
*/
|
|
386
|
-
readonly responseType: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
387
|
-
/**
|
|
388
|
-
* The outgoing HTTP request method.
|
|
389
|
-
*/
|
|
390
|
-
readonly method: string;
|
|
391
|
-
/**
|
|
392
|
-
* Outgoing URL parameters.
|
|
393
|
-
*
|
|
394
|
-
* To pass a string representation of HTTP parameters in the URL-query-string format,
|
|
395
|
-
* the `HttpParamsOptions`' `fromString` may be used. For example:
|
|
396
|
-
*
|
|
397
|
-
* ```ts
|
|
398
|
-
* new HttpParams({fromString: 'angular=awesome'})
|
|
399
|
-
* ```
|
|
400
|
-
*/
|
|
401
|
-
readonly params: HttpParams;
|
|
402
|
-
/**
|
|
403
|
-
* The outgoing URL with all URL parameters set.
|
|
404
|
-
*/
|
|
405
|
-
readonly urlWithParams: string;
|
|
406
|
-
/**
|
|
407
|
-
* The HttpTransferCache option for the request
|
|
408
|
-
*/
|
|
409
|
-
readonly transferCache?: {
|
|
410
|
-
includeHeaders?: string[];
|
|
411
|
-
} | boolean;
|
|
412
|
-
constructor(method: 'GET' | 'HEAD', url: string, init?: {
|
|
413
|
-
headers?: HttpHeaders;
|
|
414
|
-
context?: HttpContext;
|
|
415
|
-
reportProgress?: boolean;
|
|
416
|
-
params?: HttpParams;
|
|
417
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
418
|
-
withCredentials?: boolean;
|
|
419
|
-
/**
|
|
420
|
-
* This property accepts either a boolean to enable/disable transferring cache for eligible
|
|
421
|
-
* requests performed using `HttpClient`, or an object, which allows to configure cache
|
|
422
|
-
* parameters, such as which headers should be included (no headers are included by default).
|
|
423
|
-
*
|
|
424
|
-
* Setting this property will override the options passed to `provideClientHydration()` for this
|
|
425
|
-
* particular request
|
|
426
|
-
*/
|
|
427
|
-
transferCache?: {
|
|
428
|
-
includeHeaders?: string[];
|
|
429
|
-
} | boolean;
|
|
430
|
-
});
|
|
431
|
-
constructor(method: 'DELETE' | 'JSONP' | 'OPTIONS', url: string, init?: {
|
|
432
|
-
headers?: HttpHeaders;
|
|
433
|
-
context?: HttpContext;
|
|
434
|
-
reportProgress?: boolean;
|
|
435
|
-
params?: HttpParams;
|
|
436
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
437
|
-
withCredentials?: boolean;
|
|
438
|
-
});
|
|
439
|
-
constructor(method: 'POST', url: string, body: T | null, init?: {
|
|
440
|
-
headers?: HttpHeaders;
|
|
441
|
-
context?: HttpContext;
|
|
442
|
-
reportProgress?: boolean;
|
|
443
|
-
params?: HttpParams;
|
|
444
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
445
|
-
withCredentials?: boolean;
|
|
446
|
-
/**
|
|
447
|
-
* This property accepts either a boolean to enable/disable transferring cache for eligible
|
|
448
|
-
* requests performed using `HttpClient`, or an object, which allows to configure cache
|
|
449
|
-
* parameters, such as which headers should be included (no headers are included by default).
|
|
450
|
-
*
|
|
451
|
-
* Setting this property will override the options passed to `provideClientHydration()` for this
|
|
452
|
-
* particular request
|
|
453
|
-
*/
|
|
454
|
-
transferCache?: {
|
|
455
|
-
includeHeaders?: string[];
|
|
456
|
-
} | boolean;
|
|
457
|
-
});
|
|
458
|
-
constructor(method: 'PUT' | 'PATCH', url: string, body: T | null, init?: {
|
|
459
|
-
headers?: HttpHeaders;
|
|
460
|
-
context?: HttpContext;
|
|
461
|
-
reportProgress?: boolean;
|
|
462
|
-
params?: HttpParams;
|
|
463
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
464
|
-
withCredentials?: boolean;
|
|
465
|
-
});
|
|
466
|
-
constructor(method: string, url: string, body: T | null, init?: {
|
|
467
|
-
headers?: HttpHeaders;
|
|
468
|
-
context?: HttpContext;
|
|
469
|
-
reportProgress?: boolean;
|
|
470
|
-
params?: HttpParams;
|
|
471
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
472
|
-
withCredentials?: boolean;
|
|
473
|
-
/**
|
|
474
|
-
* This property accepts either a boolean to enable/disable transferring cache for eligible
|
|
475
|
-
* requests performed using `HttpClient`, or an object, which allows to configure cache
|
|
476
|
-
* parameters, such as which headers should be included (no headers are included by default).
|
|
477
|
-
*
|
|
478
|
-
* Setting this property will override the options passed to `provideClientHydration()` for this
|
|
479
|
-
* particular request
|
|
480
|
-
*/
|
|
481
|
-
transferCache?: {
|
|
482
|
-
includeHeaders?: string[];
|
|
483
|
-
} | boolean;
|
|
484
|
-
});
|
|
485
|
-
/**
|
|
486
|
-
* Transform the free-form body into a serialized format suitable for
|
|
487
|
-
* transmission to the server.
|
|
488
|
-
*/
|
|
489
|
-
serializeBody(): ArrayBuffer | Blob | FormData | URLSearchParams | string | null;
|
|
490
|
-
/**
|
|
491
|
-
* Examine the body and attempt to infer an appropriate MIME type
|
|
492
|
-
* for it.
|
|
493
|
-
*
|
|
494
|
-
* If no such type can be inferred, this method will return `null`.
|
|
495
|
-
*/
|
|
496
|
-
detectContentTypeHeader(): string | null;
|
|
497
|
-
clone(): HttpRequest<T>;
|
|
498
|
-
clone(update: {
|
|
499
|
-
headers?: HttpHeaders;
|
|
500
|
-
context?: HttpContext;
|
|
501
|
-
reportProgress?: boolean;
|
|
502
|
-
params?: HttpParams;
|
|
503
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
504
|
-
withCredentials?: boolean;
|
|
505
|
-
transferCache?: {
|
|
506
|
-
includeHeaders?: string[];
|
|
507
|
-
} | boolean;
|
|
508
|
-
body?: T | null;
|
|
509
|
-
method?: string;
|
|
510
|
-
url?: string;
|
|
511
|
-
setHeaders?: {
|
|
512
|
-
[name: string]: string | string[];
|
|
513
|
-
};
|
|
514
|
-
setParams?: {
|
|
515
|
-
[param: string]: string;
|
|
516
|
-
};
|
|
517
|
-
}): HttpRequest<T>;
|
|
518
|
-
clone<V>(update: {
|
|
519
|
-
headers?: HttpHeaders;
|
|
520
|
-
context?: HttpContext;
|
|
521
|
-
reportProgress?: boolean;
|
|
522
|
-
params?: HttpParams;
|
|
523
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
524
|
-
withCredentials?: boolean;
|
|
525
|
-
transferCache?: {
|
|
526
|
-
includeHeaders?: string[];
|
|
527
|
-
} | boolean;
|
|
528
|
-
body?: V | null;
|
|
529
|
-
method?: string;
|
|
530
|
-
url?: string;
|
|
531
|
-
setHeaders?: {
|
|
532
|
-
[name: string]: string | string[];
|
|
533
|
-
};
|
|
534
|
-
setParams?: {
|
|
535
|
-
[param: string]: string;
|
|
536
|
-
};
|
|
537
|
-
}): HttpRequest<V>;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Type enumeration for the different kinds of `HttpEvent`.
|
|
542
|
-
*
|
|
543
|
-
* @publicApi
|
|
544
|
-
*/
|
|
545
|
-
declare enum HttpEventType {
|
|
546
|
-
/**
|
|
547
|
-
* The request was sent out over the wire.
|
|
548
|
-
*/
|
|
549
|
-
Sent = 0,
|
|
550
|
-
/**
|
|
551
|
-
* An upload progress event was received.
|
|
552
|
-
*
|
|
553
|
-
* Note: The `FetchBackend` doesn't support progress report on uploads.
|
|
554
|
-
*/
|
|
555
|
-
UploadProgress = 1,
|
|
556
|
-
/**
|
|
557
|
-
* The response status code and headers were received.
|
|
558
|
-
*/
|
|
559
|
-
ResponseHeader = 2,
|
|
560
|
-
/**
|
|
561
|
-
* A download progress event was received.
|
|
562
|
-
*/
|
|
563
|
-
DownloadProgress = 3,
|
|
564
|
-
/**
|
|
565
|
-
* The full response including the body was received.
|
|
566
|
-
*/
|
|
567
|
-
Response = 4,
|
|
568
|
-
/**
|
|
569
|
-
* A custom event from an interceptor or a backend.
|
|
570
|
-
*/
|
|
571
|
-
User = 5
|
|
572
|
-
}
|
|
573
|
-
/**
|
|
574
|
-
* Base interface for progress events.
|
|
575
|
-
*
|
|
576
|
-
* @publicApi
|
|
577
|
-
*/
|
|
578
|
-
interface HttpProgressEvent {
|
|
579
|
-
/**
|
|
580
|
-
* Progress event type is either upload or download.
|
|
581
|
-
*/
|
|
582
|
-
type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress;
|
|
583
|
-
/**
|
|
584
|
-
* Number of bytes uploaded or downloaded.
|
|
585
|
-
*/
|
|
586
|
-
loaded: number;
|
|
587
|
-
/**
|
|
588
|
-
* Total number of bytes to upload or download. Depending on the request or
|
|
589
|
-
* response, this may not be computable and thus may not be present.
|
|
590
|
-
*/
|
|
591
|
-
total?: number;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* A download progress event.
|
|
595
|
-
*
|
|
596
|
-
* @publicApi
|
|
597
|
-
*/
|
|
598
|
-
interface HttpDownloadProgressEvent extends HttpProgressEvent {
|
|
599
|
-
type: HttpEventType.DownloadProgress;
|
|
600
|
-
/**
|
|
601
|
-
* The partial response body as downloaded so far.
|
|
602
|
-
*
|
|
603
|
-
* Only present if the responseType was `text`.
|
|
604
|
-
*/
|
|
605
|
-
partialText?: string;
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* An upload progress event.
|
|
609
|
-
*
|
|
610
|
-
* Note: The `FetchBackend` doesn't support progress report on uploads.
|
|
611
|
-
*
|
|
612
|
-
* @publicApi
|
|
613
|
-
*/
|
|
614
|
-
interface HttpUploadProgressEvent extends HttpProgressEvent {
|
|
615
|
-
type: HttpEventType.UploadProgress;
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* An event indicating that the request was sent to the server. Useful
|
|
619
|
-
* when a request may be retried multiple times, to distinguish between
|
|
620
|
-
* retries on the final event stream.
|
|
621
|
-
*
|
|
622
|
-
* @publicApi
|
|
623
|
-
*/
|
|
624
|
-
interface HttpSentEvent {
|
|
625
|
-
type: HttpEventType.Sent;
|
|
626
|
-
}
|
|
627
|
-
/**
|
|
628
|
-
* A user-defined event.
|
|
629
|
-
*
|
|
630
|
-
* Grouping all custom events under this type ensures they will be handled
|
|
631
|
-
* and forwarded by all implementations of interceptors.
|
|
632
|
-
*
|
|
633
|
-
* @publicApi
|
|
634
|
-
*/
|
|
635
|
-
interface HttpUserEvent<T> {
|
|
636
|
-
type: HttpEventType.User;
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* Union type for all possible events on the response stream.
|
|
640
|
-
*
|
|
641
|
-
* Typed according to the expected type of the response.
|
|
642
|
-
*
|
|
643
|
-
* @publicApi
|
|
644
|
-
*/
|
|
645
|
-
type HttpEvent<T> = HttpSentEvent | HttpHeaderResponse | HttpResponse<T> | HttpProgressEvent | HttpUserEvent<T>;
|
|
646
|
-
/**
|
|
647
|
-
* Base class for both `HttpResponse` and `HttpHeaderResponse`.
|
|
648
|
-
*
|
|
649
|
-
* @publicApi
|
|
650
|
-
*/
|
|
651
|
-
declare abstract class HttpResponseBase {
|
|
652
|
-
/**
|
|
653
|
-
* All response headers.
|
|
654
|
-
*/
|
|
655
|
-
readonly headers: HttpHeaders;
|
|
656
|
-
/**
|
|
657
|
-
* Response status code.
|
|
658
|
-
*/
|
|
659
|
-
readonly status: number;
|
|
660
|
-
/**
|
|
661
|
-
* Textual description of response status code, defaults to OK.
|
|
662
|
-
*
|
|
663
|
-
* Do not depend on this.
|
|
664
|
-
*/
|
|
665
|
-
readonly statusText: string;
|
|
666
|
-
/**
|
|
667
|
-
* URL of the resource retrieved, or null if not available.
|
|
668
|
-
*/
|
|
669
|
-
readonly url: string | null;
|
|
670
|
-
/**
|
|
671
|
-
* Whether the status code falls in the 2xx range.
|
|
672
|
-
*/
|
|
673
|
-
readonly ok: boolean;
|
|
674
|
-
/**
|
|
675
|
-
* Type of the response, narrowed to either the full response or the header.
|
|
676
|
-
*/
|
|
677
|
-
readonly type: HttpEventType.Response | HttpEventType.ResponseHeader;
|
|
678
|
-
/**
|
|
679
|
-
* Super-constructor for all responses.
|
|
680
|
-
*
|
|
681
|
-
* The single parameter accepted is an initialization hash. Any properties
|
|
682
|
-
* of the response passed there will override the default values.
|
|
683
|
-
*/
|
|
684
|
-
constructor(init: {
|
|
685
|
-
headers?: HttpHeaders;
|
|
686
|
-
status?: number;
|
|
687
|
-
statusText?: string;
|
|
688
|
-
url?: string;
|
|
689
|
-
}, defaultStatus?: number, defaultStatusText?: string);
|
|
690
|
-
}
|
|
691
|
-
/**
|
|
692
|
-
* A partial HTTP response which only includes the status and header data,
|
|
693
|
-
* but no response body.
|
|
694
|
-
*
|
|
695
|
-
* `HttpHeaderResponse` is a `HttpEvent` available on the response
|
|
696
|
-
* event stream, only when progress events are requested.
|
|
697
|
-
*
|
|
698
|
-
* @publicApi
|
|
699
|
-
*/
|
|
700
|
-
declare class HttpHeaderResponse extends HttpResponseBase {
|
|
701
|
-
/**
|
|
702
|
-
* Create a new `HttpHeaderResponse` with the given parameters.
|
|
703
|
-
*/
|
|
704
|
-
constructor(init?: {
|
|
705
|
-
headers?: HttpHeaders;
|
|
706
|
-
status?: number;
|
|
707
|
-
statusText?: string;
|
|
708
|
-
url?: string;
|
|
709
|
-
});
|
|
710
|
-
readonly type: HttpEventType.ResponseHeader;
|
|
711
|
-
/**
|
|
712
|
-
* Copy this `HttpHeaderResponse`, overriding its contents with the
|
|
713
|
-
* given parameter hash.
|
|
714
|
-
*/
|
|
715
|
-
clone(update?: {
|
|
716
|
-
headers?: HttpHeaders;
|
|
717
|
-
status?: number;
|
|
718
|
-
statusText?: string;
|
|
719
|
-
url?: string;
|
|
720
|
-
}): HttpHeaderResponse;
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* A full HTTP response, including a typed response body (which may be `null`
|
|
724
|
-
* if one was not returned).
|
|
725
|
-
*
|
|
726
|
-
* `HttpResponse` is a `HttpEvent` available on the response event
|
|
727
|
-
* stream.
|
|
728
|
-
*
|
|
729
|
-
* @publicApi
|
|
730
|
-
*/
|
|
731
|
-
declare class HttpResponse<T> extends HttpResponseBase {
|
|
732
|
-
/**
|
|
733
|
-
* The response body, or `null` if one was not returned.
|
|
734
|
-
*/
|
|
735
|
-
readonly body: T | null;
|
|
736
|
-
/**
|
|
737
|
-
* Construct a new `HttpResponse`.
|
|
738
|
-
*/
|
|
739
|
-
constructor(init?: {
|
|
740
|
-
body?: T | null;
|
|
741
|
-
headers?: HttpHeaders;
|
|
742
|
-
status?: number;
|
|
743
|
-
statusText?: string;
|
|
744
|
-
url?: string;
|
|
745
|
-
});
|
|
746
|
-
readonly type: HttpEventType.Response;
|
|
747
|
-
clone(): HttpResponse<T>;
|
|
748
|
-
clone(update: {
|
|
749
|
-
headers?: HttpHeaders;
|
|
750
|
-
status?: number;
|
|
751
|
-
statusText?: string;
|
|
752
|
-
url?: string;
|
|
753
|
-
}): HttpResponse<T>;
|
|
754
|
-
clone<V>(update: {
|
|
755
|
-
body?: V | null;
|
|
756
|
-
headers?: HttpHeaders;
|
|
757
|
-
status?: number;
|
|
758
|
-
statusText?: string;
|
|
759
|
-
url?: string;
|
|
760
|
-
}): HttpResponse<V>;
|
|
761
|
-
}
|
|
762
|
-
/**
|
|
763
|
-
* A response that represents an error or failure, either from a
|
|
764
|
-
* non-successful HTTP status, an error while executing the request,
|
|
765
|
-
* or some other failure which occurred during the parsing of the response.
|
|
766
|
-
*
|
|
767
|
-
* Any error returned on the `Observable` response stream will be
|
|
768
|
-
* wrapped in an `HttpErrorResponse` to provide additional context about
|
|
769
|
-
* the state of the HTTP layer when the error occurred. The error property
|
|
770
|
-
* will contain either a wrapped Error object or the error response returned
|
|
771
|
-
* from the server.
|
|
772
|
-
*
|
|
773
|
-
* @publicApi
|
|
774
|
-
*/
|
|
775
|
-
declare class HttpErrorResponse extends HttpResponseBase implements Error {
|
|
776
|
-
readonly name = "HttpErrorResponse";
|
|
777
|
-
readonly message: string;
|
|
778
|
-
readonly error: any | null;
|
|
779
|
-
/**
|
|
780
|
-
* Errors are never okay, even when the status code is in the 2xx success range.
|
|
781
|
-
*/
|
|
782
|
-
readonly ok = false;
|
|
783
|
-
constructor(init: {
|
|
784
|
-
error?: any;
|
|
785
|
-
headers?: HttpHeaders;
|
|
786
|
-
status?: number;
|
|
787
|
-
statusText?: string;
|
|
788
|
-
url?: string;
|
|
789
|
-
});
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
* Http status codes.
|
|
793
|
-
* As per https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
|
794
|
-
* @publicApi
|
|
795
|
-
*/
|
|
796
|
-
declare enum HttpStatusCode {
|
|
797
|
-
Continue = 100,
|
|
798
|
-
SwitchingProtocols = 101,
|
|
799
|
-
Processing = 102,
|
|
800
|
-
EarlyHints = 103,
|
|
801
|
-
Ok = 200,
|
|
802
|
-
Created = 201,
|
|
803
|
-
Accepted = 202,
|
|
804
|
-
NonAuthoritativeInformation = 203,
|
|
805
|
-
NoContent = 204,
|
|
806
|
-
ResetContent = 205,
|
|
807
|
-
PartialContent = 206,
|
|
808
|
-
MultiStatus = 207,
|
|
809
|
-
AlreadyReported = 208,
|
|
810
|
-
ImUsed = 226,
|
|
811
|
-
MultipleChoices = 300,
|
|
812
|
-
MovedPermanently = 301,
|
|
813
|
-
Found = 302,
|
|
814
|
-
SeeOther = 303,
|
|
815
|
-
NotModified = 304,
|
|
816
|
-
UseProxy = 305,
|
|
817
|
-
Unused = 306,
|
|
818
|
-
TemporaryRedirect = 307,
|
|
819
|
-
PermanentRedirect = 308,
|
|
820
|
-
BadRequest = 400,
|
|
821
|
-
Unauthorized = 401,
|
|
822
|
-
PaymentRequired = 402,
|
|
823
|
-
Forbidden = 403,
|
|
824
|
-
NotFound = 404,
|
|
825
|
-
MethodNotAllowed = 405,
|
|
826
|
-
NotAcceptable = 406,
|
|
827
|
-
ProxyAuthenticationRequired = 407,
|
|
828
|
-
RequestTimeout = 408,
|
|
829
|
-
Conflict = 409,
|
|
830
|
-
Gone = 410,
|
|
831
|
-
LengthRequired = 411,
|
|
832
|
-
PreconditionFailed = 412,
|
|
833
|
-
PayloadTooLarge = 413,
|
|
834
|
-
UriTooLong = 414,
|
|
835
|
-
UnsupportedMediaType = 415,
|
|
836
|
-
RangeNotSatisfiable = 416,
|
|
837
|
-
ExpectationFailed = 417,
|
|
838
|
-
ImATeapot = 418,
|
|
839
|
-
MisdirectedRequest = 421,
|
|
840
|
-
UnprocessableEntity = 422,
|
|
841
|
-
Locked = 423,
|
|
842
|
-
FailedDependency = 424,
|
|
843
|
-
TooEarly = 425,
|
|
844
|
-
UpgradeRequired = 426,
|
|
845
|
-
PreconditionRequired = 428,
|
|
846
|
-
TooManyRequests = 429,
|
|
847
|
-
RequestHeaderFieldsTooLarge = 431,
|
|
848
|
-
UnavailableForLegalReasons = 451,
|
|
849
|
-
InternalServerError = 500,
|
|
850
|
-
NotImplemented = 501,
|
|
851
|
-
BadGateway = 502,
|
|
852
|
-
ServiceUnavailable = 503,
|
|
853
|
-
GatewayTimeout = 504,
|
|
854
|
-
HttpVersionNotSupported = 505,
|
|
855
|
-
VariantAlsoNegotiates = 506,
|
|
856
|
-
InsufficientStorage = 507,
|
|
857
|
-
LoopDetected = 508,
|
|
858
|
-
NotExtended = 510,
|
|
859
|
-
NetworkAuthenticationRequired = 511
|
|
860
|
-
}
|
|
11
|
+
import { InjectionToken, EnvironmentInjector, Provider, EnvironmentProviders, WritableResource, ResourceRef, Signal, Injector, ValueEqualityFn } from '@angular/core';
|
|
12
|
+
import { XhrFactory } from '../xhr.d-D_1kTQR5.js';
|
|
861
13
|
|
|
862
14
|
/**
|
|
863
15
|
* Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
|
|
@@ -3712,71 +2864,6 @@ declare class JsonpInterceptor {
|
|
|
3712
2864
|
static ɵprov: i0.ɵɵInjectableDeclaration<JsonpInterceptor>;
|
|
3713
2865
|
}
|
|
3714
2866
|
|
|
3715
|
-
/**
|
|
3716
|
-
* Configures XSRF protection support for outgoing requests.
|
|
3717
|
-
*
|
|
3718
|
-
* For a server that supports a cookie-based XSRF protection system,
|
|
3719
|
-
* use directly to configure XSRF protection with the correct
|
|
3720
|
-
* cookie and header names.
|
|
3721
|
-
*
|
|
3722
|
-
* If no names are supplied, the default cookie name is `XSRF-TOKEN`
|
|
3723
|
-
* and the default header name is `X-XSRF-TOKEN`.
|
|
3724
|
-
*
|
|
3725
|
-
* @publicApi
|
|
3726
|
-
* @deprecated Use withXsrfConfiguration({cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN'}) as
|
|
3727
|
-
* providers instead or `withNoXsrfProtection` if you want to disabled XSRF protection.
|
|
3728
|
-
*/
|
|
3729
|
-
declare class HttpClientXsrfModule {
|
|
3730
|
-
/**
|
|
3731
|
-
* Disable the default XSRF protection.
|
|
3732
|
-
*/
|
|
3733
|
-
static disable(): ModuleWithProviders<HttpClientXsrfModule>;
|
|
3734
|
-
/**
|
|
3735
|
-
* Configure XSRF protection.
|
|
3736
|
-
* @param options An object that can specify either or both
|
|
3737
|
-
* cookie name or header name.
|
|
3738
|
-
* - Cookie name default is `XSRF-TOKEN`.
|
|
3739
|
-
* - Header name default is `X-XSRF-TOKEN`.
|
|
3740
|
-
*
|
|
3741
|
-
*/
|
|
3742
|
-
static withOptions(options?: {
|
|
3743
|
-
cookieName?: string;
|
|
3744
|
-
headerName?: string;
|
|
3745
|
-
}): ModuleWithProviders<HttpClientXsrfModule>;
|
|
3746
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientXsrfModule, never>;
|
|
3747
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientXsrfModule, never, never, never>;
|
|
3748
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientXsrfModule>;
|
|
3749
|
-
}
|
|
3750
|
-
/**
|
|
3751
|
-
* Configures the dependency injector for `HttpClient`
|
|
3752
|
-
* with supporting services for XSRF. Automatically imported by `HttpClientModule`.
|
|
3753
|
-
*
|
|
3754
|
-
* You can add interceptors to the chain behind `HttpClient` by binding them to the
|
|
3755
|
-
* multiprovider for built-in DI token `HTTP_INTERCEPTORS`.
|
|
3756
|
-
*
|
|
3757
|
-
* @publicApi
|
|
3758
|
-
* @deprecated use `provideHttpClient(withInterceptorsFromDi())` as providers instead
|
|
3759
|
-
*/
|
|
3760
|
-
declare class HttpClientModule {
|
|
3761
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientModule, never>;
|
|
3762
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientModule, never, never, never>;
|
|
3763
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientModule>;
|
|
3764
|
-
}
|
|
3765
|
-
/**
|
|
3766
|
-
* Configures the dependency injector for `HttpClient`
|
|
3767
|
-
* with supporting services for JSONP.
|
|
3768
|
-
* Without this module, Jsonp requests reach the backend
|
|
3769
|
-
* with method JSONP, where they are rejected.
|
|
3770
|
-
*
|
|
3771
|
-
* @publicApi
|
|
3772
|
-
* @deprecated `withJsonpSupport()` as providers instead
|
|
3773
|
-
*/
|
|
3774
|
-
declare class HttpClientJsonpModule {
|
|
3775
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientJsonpModule, never>;
|
|
3776
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientJsonpModule, never, never, never>;
|
|
3777
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientJsonpModule>;
|
|
3778
|
-
}
|
|
3779
|
-
|
|
3780
2867
|
/**
|
|
3781
2868
|
* Identifies a particular kind of `HttpFeature`.
|
|
3782
2869
|
*
|
|
@@ -4032,8 +3119,7 @@ interface HttpResourceFn {
|
|
|
4032
3119
|
/**
|
|
4033
3120
|
* Create a `Resource` that fetches data with an HTTP GET request to the given URL.
|
|
4034
3121
|
*
|
|
4035
|
-
*
|
|
4036
|
-
* signals.
|
|
3122
|
+
* The resource will update when the URL changes via signals.
|
|
4037
3123
|
*
|
|
4038
3124
|
* Uses `HttpClient` to make requests and supports interceptors, testing, and the other features
|
|
4039
3125
|
* of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of
|
|
@@ -4041,14 +3127,13 @@ interface HttpResourceFn {
|
|
|
4041
3127
|
*
|
|
4042
3128
|
* @experimental
|
|
4043
3129
|
*/
|
|
4044
|
-
<TResult = unknown>(url:
|
|
3130
|
+
<TResult = unknown>(url: () => string | undefined, options: HttpResourceOptions<TResult, unknown> & {
|
|
4045
3131
|
defaultValue: NoInfer<TResult>;
|
|
4046
3132
|
}): HttpResourceRef<TResult>;
|
|
4047
3133
|
/**
|
|
4048
3134
|
* Create a `Resource` that fetches data with an HTTP GET request to the given URL.
|
|
4049
3135
|
*
|
|
4050
|
-
*
|
|
4051
|
-
* signals.
|
|
3136
|
+
* The resource will update when the URL changes via signals.
|
|
4052
3137
|
*
|
|
4053
3138
|
* Uses `HttpClient` to make requests and supports interceptors, testing, and the other features
|
|
4054
3139
|
* of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of
|
|
@@ -4056,12 +3141,11 @@ interface HttpResourceFn {
|
|
|
4056
3141
|
*
|
|
4057
3142
|
* @experimental
|
|
4058
3143
|
*/
|
|
4059
|
-
<TResult = unknown>(url:
|
|
3144
|
+
<TResult = unknown>(url: () => string | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
|
|
4060
3145
|
/**
|
|
4061
3146
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
4062
3147
|
*
|
|
4063
|
-
*
|
|
4064
|
-
* changes via signals.
|
|
3148
|
+
* The resource will update when the request changes via signals.
|
|
4065
3149
|
*
|
|
4066
3150
|
* Uses `HttpClient` to make requests and supports interceptors, testing, and the other features
|
|
4067
3151
|
* of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of
|
|
@@ -4069,14 +3153,13 @@ interface HttpResourceFn {
|
|
|
4069
3153
|
*
|
|
4070
3154
|
* @experimental
|
|
4071
3155
|
*/
|
|
4072
|
-
<TResult = unknown>(request:
|
|
3156
|
+
<TResult = unknown>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, unknown> & {
|
|
4073
3157
|
defaultValue: NoInfer<TResult>;
|
|
4074
3158
|
}): HttpResourceRef<TResult>;
|
|
4075
3159
|
/**
|
|
4076
3160
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
4077
3161
|
*
|
|
4078
|
-
*
|
|
4079
|
-
* changes via signals.
|
|
3162
|
+
* The resource will update when the request changes via signals.
|
|
4080
3163
|
*
|
|
4081
3164
|
* Uses `HttpClient` to make requests and supports interceptors, testing, and the other features
|
|
4082
3165
|
* of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of
|
|
@@ -4084,12 +3167,11 @@ interface HttpResourceFn {
|
|
|
4084
3167
|
*
|
|
4085
3168
|
* @experimental
|
|
4086
3169
|
*/
|
|
4087
|
-
<TResult = unknown>(request:
|
|
3170
|
+
<TResult = unknown>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
|
|
4088
3171
|
/**
|
|
4089
3172
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
4090
3173
|
*
|
|
4091
|
-
*
|
|
4092
|
-
* URL or request changes via signals.
|
|
3174
|
+
* The resource will update when the URL or request changes via signals.
|
|
4093
3175
|
*
|
|
4094
3176
|
* Uses `HttpClient` to make requests and supports interceptors, testing, and the other features
|
|
4095
3177
|
* of the `HttpClient` API. Data is parsed into an `ArrayBuffer`.
|
|
@@ -4097,20 +3179,19 @@ interface HttpResourceFn {
|
|
|
4097
3179
|
* @experimental
|
|
4098
3180
|
*/
|
|
4099
3181
|
arrayBuffer: {
|
|
4100
|
-
<TResult = ArrayBuffer>(url:
|
|
3182
|
+
<TResult = ArrayBuffer>(url: () => string | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
|
|
4101
3183
|
defaultValue: NoInfer<TResult>;
|
|
4102
3184
|
}): HttpResourceRef<TResult>;
|
|
4103
|
-
<TResult = ArrayBuffer>(url:
|
|
4104
|
-
<TResult = ArrayBuffer>(request:
|
|
3185
|
+
<TResult = ArrayBuffer>(url: () => string | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
|
|
3186
|
+
<TResult = ArrayBuffer>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
|
|
4105
3187
|
defaultValue: NoInfer<TResult>;
|
|
4106
3188
|
}): HttpResourceRef<TResult>;
|
|
4107
|
-
<TResult = ArrayBuffer>(request:
|
|
3189
|
+
<TResult = ArrayBuffer>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
|
|
4108
3190
|
};
|
|
4109
3191
|
/**
|
|
4110
3192
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
4111
3193
|
*
|
|
4112
|
-
*
|
|
4113
|
-
* URL or request changes via signals.
|
|
3194
|
+
* The resource will update when the URL or request changes via signals.
|
|
4114
3195
|
*
|
|
4115
3196
|
* Uses `HttpClient` to make requests and supports interceptors, testing, and the other features
|
|
4116
3197
|
* of the `HttpClient` API. Data is parsed into a `Blob`.
|
|
@@ -4118,20 +3199,19 @@ interface HttpResourceFn {
|
|
|
4118
3199
|
* @experimental
|
|
4119
3200
|
*/
|
|
4120
3201
|
blob: {
|
|
4121
|
-
<TResult = Blob>(url:
|
|
3202
|
+
<TResult = Blob>(url: () => string | undefined, options: HttpResourceOptions<TResult, Blob> & {
|
|
4122
3203
|
defaultValue: NoInfer<TResult>;
|
|
4123
3204
|
}): HttpResourceRef<TResult>;
|
|
4124
|
-
<TResult = Blob>(url:
|
|
4125
|
-
<TResult = Blob>(request:
|
|
3205
|
+
<TResult = Blob>(url: () => string | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
|
|
3206
|
+
<TResult = Blob>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, Blob> & {
|
|
4126
3207
|
defaultValue: NoInfer<TResult>;
|
|
4127
3208
|
}): HttpResourceRef<TResult>;
|
|
4128
|
-
<TResult = Blob>(request:
|
|
3209
|
+
<TResult = Blob>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
|
|
4129
3210
|
};
|
|
4130
3211
|
/**
|
|
4131
3212
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
4132
3213
|
*
|
|
4133
|
-
*
|
|
4134
|
-
* URL or request changes via signals.
|
|
3214
|
+
* The resource will update when the URL or request changes via signals.
|
|
4135
3215
|
*
|
|
4136
3216
|
* Uses `HttpClient` to make requests and supports interceptors, testing, and the other features
|
|
4137
3217
|
* of the `HttpClient` API. Data is parsed as a `string`.
|
|
@@ -4139,14 +3219,14 @@ interface HttpResourceFn {
|
|
|
4139
3219
|
* @experimental
|
|
4140
3220
|
*/
|
|
4141
3221
|
text: {
|
|
4142
|
-
<TResult = string>(url:
|
|
3222
|
+
<TResult = string>(url: () => string | undefined, options: HttpResourceOptions<TResult, string> & {
|
|
4143
3223
|
defaultValue: NoInfer<TResult>;
|
|
4144
3224
|
}): HttpResourceRef<TResult>;
|
|
4145
|
-
<TResult = string>(url:
|
|
4146
|
-
<TResult = string>(request:
|
|
3225
|
+
<TResult = string>(url: () => string | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
|
|
3226
|
+
<TResult = string>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, string> & {
|
|
4147
3227
|
defaultValue: NoInfer<TResult>;
|
|
4148
3228
|
}): HttpResourceRef<TResult>;
|
|
4149
|
-
<TResult = string>(request:
|
|
3229
|
+
<TResult = string>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
|
|
4150
3230
|
};
|
|
4151
3231
|
}
|
|
4152
3232
|
/**
|
|
@@ -4255,4 +3335,5 @@ declare abstract class HttpXsrfTokenExtractor {
|
|
|
4255
3335
|
abstract getToken(): string | null;
|
|
4256
3336
|
}
|
|
4257
3337
|
|
|
4258
|
-
export { FetchBackend, HTTP_INTERCEPTORS, HTTP_TRANSFER_CACHE_ORIGIN_MAP, HttpBackend, HttpClient,
|
|
3338
|
+
export { FetchBackend, HTTP_INTERCEPTORS, HTTP_TRANSFER_CACHE_ORIGIN_MAP, HttpBackend, HttpClient, HttpContext, HttpEvent, HttpFeatureKind, HttpHandler, HttpHeaders, HttpParams, HttpProgressEvent, HttpRequest, HttpResponse, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, httpResource, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HTTP_ROOT_INTERCEPTOR_FNS as ɵHTTP_ROOT_INTERCEPTOR_FNS, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler, REQUESTS_CONTRIBUTE_TO_STABILITY as ɵREQUESTS_CONTRIBUTE_TO_STABILITY, withHttpTransferCache as ɵwithHttpTransferCache };
|
|
3339
|
+
export type { HttpFeature, HttpHandlerFn, HttpInterceptor, HttpInterceptorFn, HttpResourceFn, HttpResourceOptions, HttpResourceRef, HttpResourceRequest, HttpTransferCacheOptions };
|