1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { EnvironmentInjector } from '@angular/core';
|
9 | import { EnvironmentProviders } from '@angular/core';
|
10 | import * as i0 from '@angular/core';
|
11 | import { InjectionToken } from '@angular/core';
|
12 | import { ModuleWithProviders } from '@angular/core';
|
13 | import { Observable } from 'rxjs';
|
14 | import { Provider } from '@angular/core';
|
15 | import { XhrFactory as XhrFactory_2 } from '@angular/common';
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export declare const HTTP_INTERCEPTORS: InjectionToken<HttpInterceptor[]>;
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare abstract class HttpBackend implements HttpHandler {
|
36 | abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 | export declare class HttpClient {
|
95 | private handler;
|
96 | constructor(handler: HttpHandler);
|
97 | /**
|
98 | * Sends an `HttpRequest` and returns a stream of `HttpEvent`s.
|
99 | *
|
100 | * @return An `Observable` of the response, with the response body as a stream of `HttpEvent`s.
|
101 | */
|
102 | request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;
|
103 | /**
|
104 | * Constructs a request that interprets the body as an `ArrayBuffer` and returns the response in
|
105 | * an `ArrayBuffer`.
|
106 | *
|
107 | * @param method The HTTP method.
|
108 | * @param url The endpoint URL.
|
109 | * @param options The HTTP options to send with the request.
|
110 | *
|
111 | *
|
112 | * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
|
113 | */
|
114 | request(method: string, url: string, options: {
|
115 | body?: any;
|
116 | headers?: HttpHeaders | {
|
117 | [header: string]: string | string[];
|
118 | };
|
119 | context?: HttpContext;
|
120 | observe?: 'body';
|
121 | params?: HttpParams | {
|
122 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
123 | };
|
124 | reportProgress?: boolean;
|
125 | responseType: 'arraybuffer';
|
126 | withCredentials?: boolean;
|
127 | }): Observable<ArrayBuffer>;
|
128 | /**
|
129 | * Constructs a request that interprets the body as a blob and returns
|
130 | * the response as a blob.
|
131 | *
|
132 | * @param method The HTTP method.
|
133 | * @param url The endpoint URL.
|
134 | * @param options The HTTP options to send with the request.
|
135 | *
|
136 | * @return An `Observable` of the response, with the response body of type `Blob`.
|
137 | */
|
138 | request(method: string, url: string, options: {
|
139 | body?: any;
|
140 | headers?: HttpHeaders | {
|
141 | [header: string]: string | string[];
|
142 | };
|
143 | context?: HttpContext;
|
144 | observe?: 'body';
|
145 | params?: HttpParams | {
|
146 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
147 | };
|
148 | reportProgress?: boolean;
|
149 | responseType: 'blob';
|
150 | withCredentials?: boolean;
|
151 | }): Observable<Blob>;
|
152 | /**
|
153 | * Constructs a request that interprets the body as a text string and
|
154 | * returns a string value.
|
155 | *
|
156 | * @param method The HTTP method.
|
157 | * @param url The endpoint URL.
|
158 | * @param options The HTTP options to send with the request.
|
159 | *
|
160 | * @return An `Observable` of the response, with the response body of type string.
|
161 | */
|
162 | request(method: string, url: string, options: {
|
163 | body?: any;
|
164 | headers?: HttpHeaders | {
|
165 | [header: string]: string | string[];
|
166 | };
|
167 | context?: HttpContext;
|
168 | observe?: 'body';
|
169 | params?: HttpParams | {
|
170 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
171 | };
|
172 | reportProgress?: boolean;
|
173 | responseType: 'text';
|
174 | withCredentials?: boolean;
|
175 | }): Observable<string>;
|
176 | /**
|
177 | * Constructs a request that interprets the body as an `ArrayBuffer` and returns the
|
178 | * the full event stream.
|
179 | *
|
180 | * @param method The HTTP method.
|
181 | * @param url The endpoint URL.
|
182 | * @param options The HTTP options to send with the request.
|
183 | *
|
184 | * @return An `Observable` of the response, with the response body as an array of `HttpEvent`s for
|
185 | * the request.
|
186 | */
|
187 | request(method: string, url: string, options: {
|
188 | body?: any;
|
189 | headers?: HttpHeaders | {
|
190 | [header: string]: string | string[];
|
191 | };
|
192 | context?: HttpContext;
|
193 | params?: HttpParams | {
|
194 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
195 | };
|
196 | observe: 'events';
|
197 | reportProgress?: boolean;
|
198 | responseType: 'arraybuffer';
|
199 | withCredentials?: boolean;
|
200 | }): Observable<HttpEvent<ArrayBuffer>>;
|
201 | /**
|
202 | * Constructs a request that interprets the body as a `Blob` and returns
|
203 | * the full event stream.
|
204 | *
|
205 | * @param method The HTTP method.
|
206 | * @param url The endpoint URL.
|
207 | * @param options The HTTP options to send with the request.
|
208 | *
|
209 | * @return An `Observable` of all `HttpEvent`s for the request,
|
210 | * with the response body of type `Blob`.
|
211 | */
|
212 | request(method: string, url: string, options: {
|
213 | body?: any;
|
214 | headers?: HttpHeaders | {
|
215 | [header: string]: string | string[];
|
216 | };
|
217 | observe: 'events';
|
218 | context?: HttpContext;
|
219 | params?: HttpParams | {
|
220 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
221 | };
|
222 | reportProgress?: boolean;
|
223 | responseType: 'blob';
|
224 | withCredentials?: boolean;
|
225 | }): Observable<HttpEvent<Blob>>;
|
226 | /**
|
227 | * Constructs a request which interprets the body as a text string and returns the full event
|
228 | * stream.
|
229 | *
|
230 | * @param method The HTTP method.
|
231 | * @param url The endpoint URL.
|
232 | * @param options The HTTP options to send with the request.
|
233 | *
|
234 | * @return An `Observable` of all `HttpEvent`s for the request,
|
235 | * with the response body of type string.
|
236 | */
|
237 | request(method: string, url: string, options: {
|
238 | body?: any;
|
239 | headers?: HttpHeaders | {
|
240 | [header: string]: string | string[];
|
241 | };
|
242 | observe: 'events';
|
243 | context?: HttpContext;
|
244 | params?: HttpParams | {
|
245 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
246 | };
|
247 | reportProgress?: boolean;
|
248 | responseType: 'text';
|
249 | withCredentials?: boolean;
|
250 | }): Observable<HttpEvent<string>>;
|
251 | /**
|
252 | * Constructs a request which interprets the body as a JavaScript object and returns the full
|
253 | * event stream.
|
254 | *
|
255 | * @param method The HTTP method.
|
256 | * @param url The endpoint URL.
|
257 | * @param options The HTTP options to send with the request.
|
258 | *
|
259 | * @return An `Observable` of all `HttpEvent`s for the request,
|
260 | * with the response body of type `Object`.
|
261 | */
|
262 | request(method: string, url: string, options: {
|
263 | body?: any;
|
264 | headers?: HttpHeaders | {
|
265 | [header: string]: string | string[];
|
266 | };
|
267 | context?: HttpContext;
|
268 | reportProgress?: boolean;
|
269 | observe: 'events';
|
270 | params?: HttpParams | {
|
271 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
272 | };
|
273 | responseType?: 'json';
|
274 | withCredentials?: boolean;
|
275 | }): Observable<HttpEvent<any>>;
|
276 | /**
|
277 | * Constructs a request which interprets the body as a JavaScript object and returns the full
|
278 | * event stream.
|
279 | *
|
280 | * @param method The HTTP method.
|
281 | * @param url The endpoint URL.
|
282 | * @param options The HTTP options to send with the request.
|
283 | *
|
284 | * @return An `Observable` of all `HttpEvent`s for the request,
|
285 | * with the response body of type `R`.
|
286 | */
|
287 | request<R>(method: string, url: string, options: {
|
288 | body?: any;
|
289 | headers?: HttpHeaders | {
|
290 | [header: string]: string | string[];
|
291 | };
|
292 | context?: HttpContext;
|
293 | reportProgress?: boolean;
|
294 | observe: 'events';
|
295 | params?: HttpParams | {
|
296 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
297 | };
|
298 | responseType?: 'json';
|
299 | withCredentials?: boolean;
|
300 | }): Observable<HttpEvent<R>>;
|
301 | /**
|
302 | * Constructs a request which interprets the body as an `ArrayBuffer`
|
303 | * and returns the full `HttpResponse`.
|
304 | *
|
305 | * @param method The HTTP method.
|
306 | * @param url The endpoint URL.
|
307 | * @param options The HTTP options to send with the request.
|
308 | *
|
309 | * @return An `Observable` of the `HttpResponse`, with the response body as an `ArrayBuffer`.
|
310 | */
|
311 | request(method: string, url: string, options: {
|
312 | body?: any;
|
313 | headers?: HttpHeaders | {
|
314 | [header: string]: string | string[];
|
315 | };
|
316 | observe: 'response';
|
317 | context?: HttpContext;
|
318 | params?: HttpParams | {
|
319 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
320 | };
|
321 | reportProgress?: boolean;
|
322 | responseType: 'arraybuffer';
|
323 | withCredentials?: boolean;
|
324 | }): Observable<HttpResponse<ArrayBuffer>>;
|
325 | /**
|
326 | * Constructs a request which interprets the body as a `Blob` and returns the full `HttpResponse`.
|
327 | *
|
328 | * @param method The HTTP method.
|
329 | * @param url The endpoint URL.
|
330 | * @param options The HTTP options to send with the request.
|
331 | *
|
332 | * @return An `Observable` of the `HttpResponse`, with the response body of type `Blob`.
|
333 | */
|
334 | request(method: string, url: string, options: {
|
335 | body?: any;
|
336 | headers?: HttpHeaders | {
|
337 | [header: string]: string | string[];
|
338 | };
|
339 | observe: 'response';
|
340 | context?: HttpContext;
|
341 | params?: HttpParams | {
|
342 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
343 | };
|
344 | reportProgress?: boolean;
|
345 | responseType: 'blob';
|
346 | withCredentials?: boolean;
|
347 | }): Observable<HttpResponse<Blob>>;
|
348 | /**
|
349 | * Constructs a request which interprets the body as a text stream and returns the full
|
350 | * `HttpResponse`.
|
351 | *
|
352 | * @param method The HTTP method.
|
353 | * @param url The endpoint URL.
|
354 | * @param options The HTTP options to send with the request.
|
355 | *
|
356 | * @return An `Observable` of the HTTP response, with the response body of type string.
|
357 | */
|
358 | request(method: string, url: string, options: {
|
359 | body?: any;
|
360 | headers?: HttpHeaders | {
|
361 | [header: string]: string | string[];
|
362 | };
|
363 | observe: 'response';
|
364 | context?: HttpContext;
|
365 | params?: HttpParams | {
|
366 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
367 | };
|
368 | reportProgress?: boolean;
|
369 | responseType: 'text';
|
370 | withCredentials?: boolean;
|
371 | }): Observable<HttpResponse<string>>;
|
372 | /**
|
373 | * Constructs a request which interprets the body as a JavaScript object and returns the full
|
374 | * `HttpResponse`.
|
375 | *
|
376 | * @param method The HTTP method.
|
377 | * @param url The endpoint URL.
|
378 | * @param options The HTTP options to send with the request.
|
379 | *
|
380 | * @return An `Observable` of the full `HttpResponse`,
|
381 | * with the response body of type `Object`.
|
382 | */
|
383 | request(method: string, url: string, options: {
|
384 | body?: any;
|
385 | headers?: HttpHeaders | {
|
386 | [header: string]: string | string[];
|
387 | };
|
388 | context?: HttpContext;
|
389 | reportProgress?: boolean;
|
390 | observe: 'response';
|
391 | params?: HttpParams | {
|
392 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
393 | };
|
394 | responseType?: 'json';
|
395 | withCredentials?: boolean;
|
396 | }): Observable<HttpResponse<Object>>;
|
397 | /**
|
398 | * Constructs a request which interprets the body as a JavaScript object and returns
|
399 | * the full `HttpResponse` with the response body in the requested type.
|
400 | *
|
401 | * @param method The HTTP method.
|
402 | * @param url The endpoint URL.
|
403 | * @param options The HTTP options to send with the request.
|
404 | *
|
405 | * @return An `Observable` of the full `HttpResponse`, with the response body of type `R`.
|
406 | */
|
407 | request<R>(method: string, url: string, options: {
|
408 | body?: any;
|
409 | headers?: HttpHeaders | {
|
410 | [header: string]: string | string[];
|
411 | };
|
412 | context?: HttpContext;
|
413 | reportProgress?: boolean;
|
414 | observe: 'response';
|
415 | params?: HttpParams | {
|
416 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
417 | };
|
418 | responseType?: 'json';
|
419 | withCredentials?: boolean;
|
420 | }): Observable<HttpResponse<R>>;
|
421 | /**
|
422 | * Constructs a request which interprets the body as a JavaScript object and returns the full
|
423 | * `HttpResponse` as a JavaScript object.
|
424 | *
|
425 | * @param method The HTTP method.
|
426 | * @param url The endpoint URL.
|
427 | * @param options The HTTP options to send with the request.
|
428 | *
|
429 | * @return An `Observable` of the `HttpResponse`, with the response body of type `Object`.
|
430 | */
|
431 | request(method: string, url: string, options?: {
|
432 | body?: any;
|
433 | headers?: HttpHeaders | {
|
434 | [header: string]: string | string[];
|
435 | };
|
436 | context?: HttpContext;
|
437 | observe?: 'body';
|
438 | params?: HttpParams | {
|
439 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
440 | };
|
441 | responseType?: 'json';
|
442 | reportProgress?: boolean;
|
443 | withCredentials?: boolean;
|
444 | }): Observable<Object>;
|
445 | /**
|
446 | * Constructs a request which interprets the body as a JavaScript object
|
447 | * with the response body of the requested type.
|
448 | *
|
449 | * @param method The HTTP method.
|
450 | * @param url The endpoint URL.
|
451 | * @param options The HTTP options to send with the request.
|
452 | *
|
453 | * @return An `Observable` of the `HttpResponse`, with the response body of type `R`.
|
454 | */
|
455 | request<R>(method: string, url: string, options?: {
|
456 | body?: any;
|
457 | headers?: HttpHeaders | {
|
458 | [header: string]: string | string[];
|
459 | };
|
460 | context?: HttpContext;
|
461 | observe?: 'body';
|
462 | params?: HttpParams | {
|
463 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
464 | };
|
465 | responseType?: 'json';
|
466 | reportProgress?: boolean;
|
467 | withCredentials?: boolean;
|
468 | }): Observable<R>;
|
469 | /**
|
470 | * Constructs a request where response type and requested observable are not known statically.
|
471 | *
|
472 | * @param method The HTTP method.
|
473 | * @param url The endpoint URL.
|
474 | * @param options The HTTP options to send with the request.
|
475 | *
|
476 | * @return An `Observable` of the requested response, with body of type `any`.
|
477 | */
|
478 | request(method: string, url: string, options?: {
|
479 | body?: any;
|
480 | headers?: HttpHeaders | {
|
481 | [header: string]: string | string[];
|
482 | };
|
483 | context?: HttpContext;
|
484 | params?: HttpParams | {
|
485 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
486 | };
|
487 | observe?: 'body' | 'events' | 'response';
|
488 | reportProgress?: boolean;
|
489 | responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
490 | withCredentials?: boolean;
|
491 | }): Observable<any>;
|
492 | /**
|
493 | * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`
|
494 | * and returns the response as an `ArrayBuffer`.
|
495 | *
|
496 | * @param url The endpoint URL.
|
497 | * @param options The HTTP options to send with the request.
|
498 | *
|
499 | * @return An `Observable` of the response body as an `ArrayBuffer`.
|
500 | */
|
501 | delete(url: string, options: {
|
502 | headers?: HttpHeaders | {
|
503 | [header: string]: string | string[];
|
504 | };
|
505 | context?: HttpContext;
|
506 | observe?: 'body';
|
507 | params?: HttpParams | {
|
508 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
509 | };
|
510 | reportProgress?: boolean;
|
511 | responseType: 'arraybuffer';
|
512 | withCredentials?: boolean;
|
513 | body?: any | null;
|
514 | }): Observable<ArrayBuffer>;
|
515 | /**
|
516 | * Constructs a `DELETE` request that interprets the body as a `Blob` and returns
|
517 | * the response as a `Blob`.
|
518 | *
|
519 | * @param url The endpoint URL.
|
520 | * @param options The HTTP options to send with the request.
|
521 | *
|
522 | * @return An `Observable` of the response body as a `Blob`.
|
523 | */
|
524 | delete(url: string, options: {
|
525 | headers?: HttpHeaders | {
|
526 | [header: string]: string | string[];
|
527 | };
|
528 | context?: HttpContext;
|
529 | observe?: 'body';
|
530 | params?: HttpParams | {
|
531 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
532 | };
|
533 | reportProgress?: boolean;
|
534 | responseType: 'blob';
|
535 | withCredentials?: boolean;
|
536 | body?: any | null;
|
537 | }): Observable<Blob>;
|
538 | /**
|
539 | * Constructs a `DELETE` request that interprets the body as a text string and returns
|
540 | * a string.
|
541 | *
|
542 | * @param url The endpoint URL.
|
543 | * @param options The HTTP options to send with the request.
|
544 | *
|
545 | * @return An `Observable` of the response, with the response body of type string.
|
546 | */
|
547 | delete(url: string, options: {
|
548 | headers?: HttpHeaders | {
|
549 | [header: string]: string | string[];
|
550 | };
|
551 | context?: HttpContext;
|
552 | observe?: 'body';
|
553 | params?: HttpParams | {
|
554 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
555 | };
|
556 | reportProgress?: boolean;
|
557 | responseType: 'text';
|
558 | withCredentials?: boolean;
|
559 | body?: any | null;
|
560 | }): Observable<string>;
|
561 | /**
|
562 | * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`
|
563 | * and returns the full event stream.
|
564 | *
|
565 | * @param url The endpoint URL.
|
566 | * @param options The HTTP options to send with the request.
|
567 | *
|
568 | * @return An `Observable` of all `HttpEvent`s for the request,
|
569 | * with response body as an `ArrayBuffer`.
|
570 | */
|
571 | delete(url: string, options: {
|
572 | headers?: HttpHeaders | {
|
573 | [header: string]: string | string[];
|
574 | };
|
575 | observe: 'events';
|
576 | context?: HttpContext;
|
577 | params?: HttpParams | {
|
578 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
579 | };
|
580 | reportProgress?: boolean;
|
581 | responseType: 'arraybuffer';
|
582 | withCredentials?: boolean;
|
583 | body?: any | null;
|
584 | }): Observable<HttpEvent<ArrayBuffer>>;
|
585 | /**
|
586 | * Constructs a `DELETE` request that interprets the body as a `Blob`
|
587 | * and returns the full event stream.
|
588 | *
|
589 | * @param url The endpoint URL.
|
590 | * @param options The HTTP options to send with the request.
|
591 | *
|
592 | * @return An `Observable` of all the `HttpEvent`s for the request, with the response body as a
|
593 | * `Blob`.
|
594 | */
|
595 | delete(url: string, options: {
|
596 | headers?: HttpHeaders | {
|
597 | [header: string]: string | string[];
|
598 | };
|
599 | observe: 'events';
|
600 | context?: HttpContext;
|
601 | params?: HttpParams | {
|
602 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
603 | };
|
604 | reportProgress?: boolean;
|
605 | responseType: 'blob';
|
606 | withCredentials?: boolean;
|
607 | body?: any | null;
|
608 | }): Observable<HttpEvent<Blob>>;
|
609 | /**
|
610 | * Constructs a `DELETE` request that interprets the body as a text string
|
611 | * and returns the full event stream.
|
612 | *
|
613 | * @param url The endpoint URL.
|
614 | * @param options The HTTP options to send with the request.
|
615 | *
|
616 | * @return An `Observable` of all `HttpEvent`s for the request, with the response
|
617 | * body of type string.
|
618 | */
|
619 | delete(url: string, options: {
|
620 | headers?: HttpHeaders | {
|
621 | [header: string]: string | string[];
|
622 | };
|
623 | observe: 'events';
|
624 | context?: HttpContext;
|
625 | params?: HttpParams | {
|
626 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
627 | };
|
628 | reportProgress?: boolean;
|
629 | responseType: 'text';
|
630 | withCredentials?: boolean;
|
631 | body?: any | null;
|
632 | }): Observable<HttpEvent<string>>;
|
633 | /**
|
634 | * Constructs a `DELETE` request that interprets the body as JSON
|
635 | * and returns the full event stream.
|
636 | *
|
637 | * @param url The endpoint URL.
|
638 | * @param options The HTTP options to send with the request.
|
639 | *
|
640 | * @return An `Observable` of all `HttpEvent`s for the request, with response body of
|
641 | * type `Object`.
|
642 | */
|
643 | delete(url: string, options: {
|
644 | headers?: HttpHeaders | {
|
645 | [header: string]: string | string[];
|
646 | };
|
647 | observe: 'events';
|
648 | context?: HttpContext;
|
649 | params?: HttpParams | {
|
650 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
651 | };
|
652 | reportProgress?: boolean;
|
653 | responseType?: 'json';
|
654 | withCredentials?: boolean;
|
655 | body?: any | null;
|
656 | }): Observable<HttpEvent<Object>>;
|
657 | /**
|
658 | * Constructs a `DELETE`request that interprets the body as JSON
|
659 | * and returns the full event stream.
|
660 | *
|
661 | * @param url The endpoint URL.
|
662 | * @param options The HTTP options to send with the request.
|
663 | *
|
664 | * @return An `Observable` of all the `HttpEvent`s for the request, with a response
|
665 | * body in the requested type.
|
666 | */
|
667 | delete<T>(url: string, options: {
|
668 | headers?: HttpHeaders | {
|
669 | [header: string]: string | string[];
|
670 | };
|
671 | observe: 'events';
|
672 | context?: HttpContext;
|
673 | params?: HttpParams | {
|
674 | [param: string]: string | number | boolean | (string | number | boolean)[];
|
675 | };
|
676 | reportProgress?: boolean;
|
677 | responseType?: 'json';
|
678 | withCredentials?: boolean;
|
679 | body?: any | null;
|
680 | }): Observable<HttpEvent<T>>;
|
681 | /**
|
682 | * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer` and returns
|
683 | * the full `HttpResponse`.
|
684 | *
|
685 | * @param url The endpoint URL.
|
686 | * @param options The HTTP options to send with the request.
|
687 | *
|
688 | * @return An `Observable` of the full `HttpResponse`, with the response body as an `ArrayBuffer`.
|
689 | */
|
690 | delete(url: string, options: {
|
691 | headers?: HttpHeaders | {
|
692 | [header: string]: string | string[];
|
693 | };
|
694 | observe: 'response';
|
695 | context?: HttpContext;
|
696 | params?: HttpParams | {
|
697 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
698 | };
|
699 | reportProgress?: boolean;
|
700 | responseType: 'arraybuffer';
|
701 | withCredentials?: boolean;
|
702 | body?: any | null;
|
703 | }): Observable<HttpResponse<ArrayBuffer>>;
|
704 | /**
|
705 | * Constructs a `DELETE` request that interprets the body as a `Blob` and returns the full
|
706 | * `HttpResponse`.
|
707 | *
|
708 | * @param url The endpoint URL.
|
709 | * @param options The HTTP options to send with the request.
|
710 | *
|
711 | * @return An `Observable` of the `HttpResponse`, with the response body of type `Blob`.
|
712 | */
|
713 | delete(url: string, options: {
|
714 | headers?: HttpHeaders | {
|
715 | [header: string]: string | string[];
|
716 | };
|
717 | observe: 'response';
|
718 | context?: HttpContext;
|
719 | params?: HttpParams | {
|
720 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
721 | };
|
722 | reportProgress?: boolean;
|
723 | responseType: 'blob';
|
724 | withCredentials?: boolean;
|
725 | body?: any | null;
|
726 | }): Observable<HttpResponse<Blob>>;
|
727 | /**
|
728 | * Constructs a `DELETE` request that interprets the body as a text stream and
|
729 | * returns the full `HttpResponse`.
|
730 | *
|
731 | * @param url The endpoint URL.
|
732 | * @param options The HTTP options to send with the request.
|
733 | *
|
734 | * @return An `Observable` of the full `HttpResponse`, with the response body of type string.
|
735 | */
|
736 | delete(url: string, options: {
|
737 | headers?: HttpHeaders | {
|
738 | [header: string]: string | string[];
|
739 | };
|
740 | observe: 'response';
|
741 | context?: HttpContext;
|
742 | params?: HttpParams | {
|
743 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
744 | };
|
745 | reportProgress?: boolean;
|
746 | responseType: 'text';
|
747 | withCredentials?: boolean;
|
748 | body?: any | null;
|
749 | }): Observable<HttpResponse<string>>;
|
750 | /**
|
751 | * Constructs a `DELETE` request the interprets the body as a JavaScript object and returns
|
752 | * the full `HttpResponse`.
|
753 | *
|
754 | * @param url The endpoint URL.
|
755 | * @param options The HTTP options to send with the request.
|
756 | *
|
757 | * @return An `Observable` of the `HttpResponse`, with the response body of type `Object`.
|
758 | *
|
759 | */
|
760 | delete(url: string, options: {
|
761 | headers?: HttpHeaders | {
|
762 | [header: string]: string | string[];
|
763 | };
|
764 | observe: 'response';
|
765 | context?: HttpContext;
|
766 | params?: HttpParams | {
|
767 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
768 | };
|
769 | reportProgress?: boolean;
|
770 | responseType?: 'json';
|
771 | withCredentials?: boolean;
|
772 | body?: any | null;
|
773 | }): Observable<HttpResponse<Object>>;
|
774 | /**
|
775 | * Constructs a `DELETE` request that interprets the body as JSON
|
776 | * and returns the full `HttpResponse`.
|
777 | *
|
778 | * @param url The endpoint URL.
|
779 | * @param options The HTTP options to send with the request.
|
780 | *
|
781 | * @return An `Observable` of the `HttpResponse`, with the response body of the requested type.
|
782 | */
|
783 | delete<T>(url: string, options: {
|
784 | headers?: HttpHeaders | {
|
785 | [header: string]: string | string[];
|
786 | };
|
787 | observe: 'response';
|
788 | context?: HttpContext;
|
789 | params?: HttpParams | {
|
790 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
791 | };
|
792 | reportProgress?: boolean;
|
793 | responseType?: 'json';
|
794 | withCredentials?: boolean;
|
795 | body?: any | null;
|
796 | }): Observable<HttpResponse<T>>;
|
797 | /**
|
798 | * Constructs a `DELETE` request that interprets the body as JSON and
|
799 | * returns the response body as an object parsed from JSON.
|
800 | *
|
801 | * @param url The endpoint URL.
|
802 | * @param options The HTTP options to send with the request.
|
803 | *
|
804 | * @return An `Observable` of the response, with the response body of type `Object`.
|
805 | */
|
806 | delete(url: string, options?: {
|
807 | headers?: HttpHeaders | {
|
808 | [header: string]: string | string[];
|
809 | };
|
810 | context?: HttpContext;
|
811 | observe?: 'body';
|
812 | params?: HttpParams | {
|
813 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
814 | };
|
815 | reportProgress?: boolean;
|
816 | responseType?: 'json';
|
817 | withCredentials?: boolean;
|
818 | body?: any | null;
|
819 | }): Observable<Object>;
|
820 | /**
|
821 | * Constructs a DELETE request that interprets the body as JSON and returns
|
822 | * the response in a given type.
|
823 | *
|
824 | * @param url The endpoint URL.
|
825 | * @param options The HTTP options to send with the request.
|
826 | *
|
827 | * @return An `Observable` of the `HttpResponse`, with response body in the requested type.
|
828 | */
|
829 | delete<T>(url: string, options?: {
|
830 | headers?: HttpHeaders | {
|
831 | [header: string]: string | string[];
|
832 | };
|
833 | context?: HttpContext;
|
834 | observe?: 'body';
|
835 | params?: HttpParams | {
|
836 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
837 | };
|
838 | reportProgress?: boolean;
|
839 | responseType?: 'json';
|
840 | withCredentials?: boolean;
|
841 | body?: any | null;
|
842 | }): Observable<T>;
|
843 | /**
|
844 | * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns the
|
845 | * response in an `ArrayBuffer`.
|
846 | *
|
847 | * @param url The endpoint URL.
|
848 | * @param options The HTTP options to send with the request.
|
849 | *
|
850 | * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
|
851 | */
|
852 | get(url: string, options: {
|
853 | headers?: HttpHeaders | {
|
854 | [header: string]: string | string[];
|
855 | };
|
856 | context?: HttpContext;
|
857 | observe?: 'body';
|
858 | params?: HttpParams | {
|
859 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
860 | };
|
861 | reportProgress?: boolean;
|
862 | responseType: 'arraybuffer';
|
863 | withCredentials?: boolean;
|
864 | }): Observable<ArrayBuffer>;
|
865 | /**
|
866 | * Constructs a `GET` request that interprets the body as a `Blob`
|
867 | * and returns the response as a `Blob`.
|
868 | *
|
869 | * @param url The endpoint URL.
|
870 | * @param options The HTTP options to send with the request.
|
871 | *
|
872 | * @return An `Observable` of the response, with the response body as a `Blob`.
|
873 | */
|
874 | get(url: string, options: {
|
875 | headers?: HttpHeaders | {
|
876 | [header: string]: string | string[];
|
877 | };
|
878 | context?: HttpContext;
|
879 | observe?: 'body';
|
880 | params?: HttpParams | {
|
881 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
882 | };
|
883 | reportProgress?: boolean;
|
884 | responseType: 'blob';
|
885 | withCredentials?: boolean;
|
886 | }): Observable<Blob>;
|
887 | /**
|
888 | * Constructs a `GET` request that interprets the body as a text string
|
889 | * and returns the response as a string value.
|
890 | *
|
891 | * @param url The endpoint URL.
|
892 | * @param options The HTTP options to send with the request.
|
893 | *
|
894 | * @return An `Observable` of the response, with the response body of type string.
|
895 | */
|
896 | get(url: string, options: {
|
897 | headers?: HttpHeaders | {
|
898 | [header: string]: string | string[];
|
899 | };
|
900 | context?: HttpContext;
|
901 | observe?: 'body';
|
902 | params?: HttpParams | {
|
903 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
904 | };
|
905 | reportProgress?: boolean;
|
906 | responseType: 'text';
|
907 | withCredentials?: boolean;
|
908 | }): Observable<string>;
|
909 | /**
|
910 | * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns
|
911 | * the full event stream.
|
912 | *
|
913 | * @param url The endpoint URL.
|
914 | * @param options The HTTP options to send with the request.
|
915 | *
|
916 | * @return An `Observable` of all `HttpEvent`s for the request, with the response
|
917 | * body as an `ArrayBuffer`.
|
918 | */
|
919 | get(url: string, options: {
|
920 | headers?: HttpHeaders | {
|
921 | [header: string]: string | string[];
|
922 | };
|
923 | observe: 'events';
|
924 | context?: HttpContext;
|
925 | params?: HttpParams | {
|
926 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
927 | };
|
928 | reportProgress?: boolean;
|
929 | responseType: 'arraybuffer';
|
930 | withCredentials?: boolean;
|
931 | }): Observable<HttpEvent<ArrayBuffer>>;
|
932 | /**
|
933 | * Constructs a `GET` request that interprets the body as a `Blob` and
|
934 | * returns the full event stream.
|
935 | *
|
936 | * @param url The endpoint URL.
|
937 | * @param options The HTTP options to send with the request.
|
938 | *
|
939 | * @return An `Observable` of the response, with the response body as a `Blob`.
|
940 | */
|
941 | get(url: string, options: {
|
942 | headers?: HttpHeaders | {
|
943 | [header: string]: string | string[];
|
944 | };
|
945 | observe: 'events';
|
946 | context?: HttpContext;
|
947 | params?: HttpParams | {
|
948 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
949 | };
|
950 | reportProgress?: boolean;
|
951 | responseType: 'blob';
|
952 | withCredentials?: boolean;
|
953 | }): Observable<HttpEvent<Blob>>;
|
954 | /**
|
955 | * Constructs a `GET` request that interprets the body as a text string and returns
|
956 | * the full event stream.
|
957 | *
|
958 | * @param url The endpoint URL.
|
959 | * @param options The HTTP options to send with the request.
|
960 | *
|
961 | * @return An `Observable` of the response, with the response body of type string.
|
962 | */
|
963 | get(url: string, options: {
|
964 | headers?: HttpHeaders | {
|
965 | [header: string]: string | string[];
|
966 | };
|
967 | observe: 'events';
|
968 | context?: HttpContext;
|
969 | params?: HttpParams | {
|
970 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
971 | };
|
972 | reportProgress?: boolean;
|
973 | responseType: 'text';
|
974 | withCredentials?: boolean;
|
975 | }): Observable<HttpEvent<string>>;
|
976 | /**
|
977 | * Constructs a `GET` request that interprets the body as JSON
|
978 | * and returns the full event stream.
|
979 | *
|
980 | * @param url The endpoint URL.
|
981 | * @param options The HTTP options to send with the request.
|
982 | *
|
983 | * @return An `Observable` of the response, with the response body of type `Object`.
|
984 | */
|
985 | get(url: string, options: {
|
986 | headers?: HttpHeaders | {
|
987 | [header: string]: string | string[];
|
988 | };
|
989 | observe: 'events';
|
990 | context?: HttpContext;
|
991 | params?: HttpParams | {
|
992 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
993 | };
|
994 | reportProgress?: boolean;
|
995 | responseType?: 'json';
|
996 | withCredentials?: boolean;
|
997 | }): Observable<HttpEvent<Object>>;
|
998 | /**
|
999 | * Constructs a `GET` request that interprets the body as JSON and returns the full
|
1000 | * event stream.
|
1001 | *
|
1002 | * @param url The endpoint URL.
|
1003 | * @param options The HTTP options to send with the request.
|
1004 | *
|
1005 | * @return An `Observable` of the response, with a response body in the requested type.
|
1006 | */
|
1007 | get<T>(url: string, options: {
|
1008 | headers?: HttpHeaders | {
|
1009 | [header: string]: string | string[];
|
1010 | };
|
1011 | observe: 'events';
|
1012 | context?: HttpContext;
|
1013 | params?: HttpParams | {
|
1014 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1015 | };
|
1016 | reportProgress?: boolean;
|
1017 | responseType?: 'json';
|
1018 | withCredentials?: boolean;
|
1019 | }): Observable<HttpEvent<T>>;
|
1020 | /**
|
1021 | * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and
|
1022 | * returns the full `HttpResponse`.
|
1023 | *
|
1024 | * @param url The endpoint URL.
|
1025 | * @param options The HTTP options to send with the request.
|
1026 | *
|
1027 | * @return An `Observable` of the `HttpResponse` for the request,
|
1028 | * with the response body as an `ArrayBuffer`.
|
1029 | */
|
1030 | get(url: string, options: {
|
1031 | headers?: HttpHeaders | {
|
1032 | [header: string]: string | string[];
|
1033 | };
|
1034 | observe: 'response';
|
1035 | context?: HttpContext;
|
1036 | params?: HttpParams | {
|
1037 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1038 | };
|
1039 | reportProgress?: boolean;
|
1040 | responseType: 'arraybuffer';
|
1041 | withCredentials?: boolean;
|
1042 | }): Observable<HttpResponse<ArrayBuffer>>;
|
1043 | /**
|
1044 | * Constructs a `GET` request that interprets the body as a `Blob` and
|
1045 | * returns the full `HttpResponse`.
|
1046 | *
|
1047 | * @param url The endpoint URL.
|
1048 | * @param options The HTTP options to send with the request.
|
1049 | *
|
1050 | * @return An `Observable` of the `HttpResponse` for the request,
|
1051 | * with the response body as a `Blob`.
|
1052 | */
|
1053 | get(url: string, options: {
|
1054 | headers?: HttpHeaders | {
|
1055 | [header: string]: string | string[];
|
1056 | };
|
1057 | observe: 'response';
|
1058 | context?: HttpContext;
|
1059 | params?: HttpParams | {
|
1060 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1061 | };
|
1062 | reportProgress?: boolean;
|
1063 | responseType: 'blob';
|
1064 | withCredentials?: boolean;
|
1065 | }): Observable<HttpResponse<Blob>>;
|
1066 | /**
|
1067 | * Constructs a `GET` request that interprets the body as a text stream and
|
1068 | * returns the full `HttpResponse`.
|
1069 | *
|
1070 | * @param url The endpoint URL.
|
1071 | * @param options The HTTP options to send with the request.
|
1072 | *
|
1073 | * @return An `Observable` of the `HttpResponse` for the request,
|
1074 | * with the response body of type string.
|
1075 | */
|
1076 | get(url: string, options: {
|
1077 | headers?: HttpHeaders | {
|
1078 | [header: string]: string | string[];
|
1079 | };
|
1080 | observe: 'response';
|
1081 | context?: HttpContext;
|
1082 | params?: HttpParams | {
|
1083 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1084 | };
|
1085 | reportProgress?: boolean;
|
1086 | responseType: 'text';
|
1087 | withCredentials?: boolean;
|
1088 | }): Observable<HttpResponse<string>>;
|
1089 | /**
|
1090 | * Constructs a `GET` request that interprets the body as JSON and
|
1091 | * returns the full `HttpResponse`.
|
1092 | *
|
1093 | * @param url The endpoint URL.
|
1094 | * @param options The HTTP options to send with the request.
|
1095 | *
|
1096 | * @return An `Observable` of the full `HttpResponse`,
|
1097 | * with the response body of type `Object`.
|
1098 | */
|
1099 | get(url: string, options: {
|
1100 | headers?: HttpHeaders | {
|
1101 | [header: string]: string | string[];
|
1102 | };
|
1103 | observe: 'response';
|
1104 | context?: HttpContext;
|
1105 | params?: HttpParams | {
|
1106 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1107 | };
|
1108 | reportProgress?: boolean;
|
1109 | responseType?: 'json';
|
1110 | withCredentials?: boolean;
|
1111 | }): Observable<HttpResponse<Object>>;
|
1112 | /**
|
1113 | * Constructs a `GET` request that interprets the body as JSON and
|
1114 | * returns the full `HttpResponse`.
|
1115 | *
|
1116 | * @param url The endpoint URL.
|
1117 | * @param options The HTTP options to send with the request.
|
1118 | *
|
1119 | * @return An `Observable` of the full `HttpResponse` for the request,
|
1120 | * with a response body in the requested type.
|
1121 | */
|
1122 | get<T>(url: string, options: {
|
1123 | headers?: HttpHeaders | {
|
1124 | [header: string]: string | string[];
|
1125 | };
|
1126 | observe: 'response';
|
1127 | context?: HttpContext;
|
1128 | params?: HttpParams | {
|
1129 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1130 | };
|
1131 | reportProgress?: boolean;
|
1132 | responseType?: 'json';
|
1133 | withCredentials?: boolean;
|
1134 | }): Observable<HttpResponse<T>>;
|
1135 | /**
|
1136 | * Constructs a `GET` request that interprets the body as JSON and
|
1137 | * returns the response body as an object parsed from JSON.
|
1138 | *
|
1139 | * @param url The endpoint URL.
|
1140 | * @param options The HTTP options to send with the request.
|
1141 | *
|
1142 | *
|
1143 | * @return An `Observable` of the response body as a JavaScript object.
|
1144 | */
|
1145 | get(url: string, options?: {
|
1146 | headers?: HttpHeaders | {
|
1147 | [header: string]: string | string[];
|
1148 | };
|
1149 | context?: HttpContext;
|
1150 | observe?: 'body';
|
1151 | params?: HttpParams | {
|
1152 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1153 | };
|
1154 | reportProgress?: boolean;
|
1155 | responseType?: 'json';
|
1156 | withCredentials?: boolean;
|
1157 | }): Observable<Object>;
|
1158 | /**
|
1159 | * Constructs a `GET` request that interprets the body as JSON and returns
|
1160 | * the response body in a given type.
|
1161 | *
|
1162 | * @param url The endpoint URL.
|
1163 | * @param options The HTTP options to send with the request.
|
1164 | *
|
1165 | * @return An `Observable` of the `HttpResponse`, with a response body in the requested type.
|
1166 | */
|
1167 | get<T>(url: string, options?: {
|
1168 | headers?: HttpHeaders | {
|
1169 | [header: string]: string | string[];
|
1170 | };
|
1171 | context?: HttpContext;
|
1172 | observe?: 'body';
|
1173 | params?: HttpParams | {
|
1174 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1175 | };
|
1176 | reportProgress?: boolean;
|
1177 | responseType?: 'json';
|
1178 | withCredentials?: boolean;
|
1179 | }): Observable<T>;
|
1180 | /**
|
1181 | * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer` and
|
1182 | * returns the response as an `ArrayBuffer`.
|
1183 | *
|
1184 | * @param url The endpoint URL.
|
1185 | * @param options The HTTP options to send with the request.
|
1186 | *
|
1187 | * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
|
1188 | */
|
1189 | head(url: string, options: {
|
1190 | headers?: HttpHeaders | {
|
1191 | [header: string]: string | string[];
|
1192 | };
|
1193 | context?: HttpContext;
|
1194 | observe?: 'body';
|
1195 | params?: HttpParams | {
|
1196 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1197 | };
|
1198 | reportProgress?: boolean;
|
1199 | responseType: 'arraybuffer';
|
1200 | withCredentials?: boolean;
|
1201 | }): Observable<ArrayBuffer>;
|
1202 | /**
|
1203 | * Constructs a `HEAD` request that interprets the body as a `Blob` and returns
|
1204 | * the response as a `Blob`.
|
1205 | *
|
1206 | * @param url The endpoint URL.
|
1207 | * @param options The HTTP options to send with the request.
|
1208 | *
|
1209 | * @return An `Observable` of the response, with the response body as a `Blob`.
|
1210 | */
|
1211 | head(url: string, options: {
|
1212 | headers?: HttpHeaders | {
|
1213 | [header: string]: string | string[];
|
1214 | };
|
1215 | context?: HttpContext;
|
1216 | observe?: 'body';
|
1217 | params?: HttpParams | {
|
1218 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1219 | };
|
1220 | reportProgress?: boolean;
|
1221 | responseType: 'blob';
|
1222 | withCredentials?: boolean;
|
1223 | }): Observable<Blob>;
|
1224 | /**
|
1225 | * Constructs a `HEAD` request that interprets the body as a text string and returns the response
|
1226 | * as a string value.
|
1227 | *
|
1228 | * @param url The endpoint URL.
|
1229 | * @param options The HTTP options to send with the request.
|
1230 | *
|
1231 | * @return An `Observable` of the response, with the response body of type string.
|
1232 | */
|
1233 | head(url: string, options: {
|
1234 | headers?: HttpHeaders | {
|
1235 | [header: string]: string | string[];
|
1236 | };
|
1237 | context?: HttpContext;
|
1238 | observe?: 'body';
|
1239 | params?: HttpParams | {
|
1240 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1241 | };
|
1242 | reportProgress?: boolean;
|
1243 | responseType: 'text';
|
1244 | withCredentials?: boolean;
|
1245 | }): Observable<string>;
|
1246 | /**
|
1247 | * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer`
|
1248 | * and returns the full event stream.
|
1249 | *
|
1250 | * @param url The endpoint URL.
|
1251 | * @param options The HTTP options to send with the request.
|
1252 | *
|
1253 | * @return An `Observable` of all `HttpEvent`s for the request,
|
1254 | * with the response body as an `ArrayBuffer`.
|
1255 | */
|
1256 | head(url: string, options: {
|
1257 | headers?: HttpHeaders | {
|
1258 | [header: string]: string | string[];
|
1259 | };
|
1260 | observe: 'events';
|
1261 | context?: HttpContext;
|
1262 | params?: HttpParams | {
|
1263 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1264 | };
|
1265 | reportProgress?: boolean;
|
1266 | responseType: 'arraybuffer';
|
1267 | withCredentials?: boolean;
|
1268 | }): Observable<HttpEvent<ArrayBuffer>>;
|
1269 | /**
|
1270 | * Constructs a `HEAD` request that interprets the body as a `Blob` and
|
1271 | * returns the full event stream.
|
1272 | *
|
1273 | * @param url The endpoint URL.
|
1274 | * @param options The HTTP options to send with the request.
|
1275 | *
|
1276 | * @return An `Observable` of all `HttpEvent`s for the request,
|
1277 | * with the response body as a `Blob`.
|
1278 | */
|
1279 | head(url: string, options: {
|
1280 | headers?: HttpHeaders | {
|
1281 | [header: string]: string | string[];
|
1282 | };
|
1283 | observe: 'events';
|
1284 | context?: HttpContext;
|
1285 | params?: HttpParams | {
|
1286 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1287 | };
|
1288 | reportProgress?: boolean;
|
1289 | responseType: 'blob';
|
1290 | withCredentials?: boolean;
|
1291 | }): Observable<HttpEvent<Blob>>;
|
1292 | /**
|
1293 | * Constructs a `HEAD` request that interprets the body as a text string
|
1294 | * and returns the full event stream.
|
1295 | *
|
1296 | * @param url The endpoint URL.
|
1297 | * @param options The HTTP options to send with the request.
|
1298 | *
|
1299 | * @return An `Observable` of all `HttpEvent`s for the request, with the response body of type
|
1300 | * string.
|
1301 | */
|
1302 | head(url: string, options: {
|
1303 | headers?: HttpHeaders | {
|
1304 | [header: string]: string | string[];
|
1305 | };
|
1306 | observe: 'events';
|
1307 | context?: HttpContext;
|
1308 | params?: HttpParams | {
|
1309 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1310 | };
|
1311 | reportProgress?: boolean;
|
1312 | responseType: 'text';
|
1313 | withCredentials?: boolean;
|
1314 | }): Observable<HttpEvent<string>>;
|
1315 | /**
|
1316 | * Constructs a `HEAD` request that interprets the body as JSON
|
1317 | * and returns the full HTTP event stream.
|
1318 | *
|
1319 | * @param url The endpoint URL.
|
1320 | * @param options The HTTP options to send with the request.
|
1321 | *
|
1322 | * @return An `Observable` of all `HttpEvent`s for the request, with a response body of
|
1323 | * type `Object`.
|
1324 | */
|
1325 | head(url: string, options: {
|
1326 | headers?: HttpHeaders | {
|
1327 | [header: string]: string | string[];
|
1328 | };
|
1329 | observe: 'events';
|
1330 | context?: HttpContext;
|
1331 | params?: HttpParams | {
|
1332 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1333 | };
|
1334 | reportProgress?: boolean;
|
1335 | responseType?: 'json';
|
1336 | withCredentials?: boolean;
|
1337 | }): Observable<HttpEvent<Object>>;
|
1338 | /**
|
1339 | * Constructs a `HEAD` request that interprets the body as JSON and
|
1340 | * returns the full event stream.
|
1341 | *
|
1342 | * @return An `Observable` of all the `HttpEvent`s for the request,
|
1343 | * with a response body in the requested type.
|
1344 | *
|
1345 | * @param url The endpoint URL.
|
1346 | * @param options The HTTP options to send with the request.
|
1347 | */
|
1348 | head<T>(url: string, options: {
|
1349 | headers?: HttpHeaders | {
|
1350 | [header: string]: string | string[];
|
1351 | };
|
1352 | observe: 'events';
|
1353 | context?: HttpContext;
|
1354 | params?: HttpParams | {
|
1355 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1356 | };
|
1357 | reportProgress?: boolean;
|
1358 | responseType?: 'json';
|
1359 | withCredentials?: boolean;
|
1360 | }): Observable<HttpEvent<T>>;
|
1361 | /**
|
1362 | * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer`
|
1363 | * and returns the full HTTP response.
|
1364 | *
|
1365 | * @param url The endpoint URL.
|
1366 | * @param options The HTTP options to send with the request.
|
1367 | *
|
1368 | * @return An `Observable` of the `HttpResponse` for the request,
|
1369 | * with the response body as an `ArrayBuffer`.
|
1370 | */
|
1371 | head(url: string, options: {
|
1372 | headers?: HttpHeaders | {
|
1373 | [header: string]: string | string[];
|
1374 | };
|
1375 | observe: 'response';
|
1376 | context?: HttpContext;
|
1377 | params?: HttpParams | {
|
1378 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1379 | };
|
1380 | reportProgress?: boolean;
|
1381 | responseType: 'arraybuffer';
|
1382 | withCredentials?: boolean;
|
1383 | }): Observable<HttpResponse<ArrayBuffer>>;
|
1384 | /**
|
1385 | * Constructs a `HEAD` request that interprets the body as a `Blob` and returns
|
1386 | * the full `HttpResponse`.
|
1387 | *
|
1388 | * @param url The endpoint URL.
|
1389 | * @param options The HTTP options to send with the request.
|
1390 | *
|
1391 | * @return An `Observable` of the `HttpResponse` for the request,
|
1392 | * with the response body as a blob.
|
1393 | */
|
1394 | head(url: string, options: {
|
1395 | headers?: HttpHeaders | {
|
1396 | [header: string]: string | string[];
|
1397 | };
|
1398 | observe: 'response';
|
1399 | context?: HttpContext;
|
1400 | params?: HttpParams | {
|
1401 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1402 | };
|
1403 | reportProgress?: boolean;
|
1404 | responseType: 'blob';
|
1405 | withCredentials?: boolean;
|
1406 | }): Observable<HttpResponse<Blob>>;
|
1407 | /**
|
1408 | * Constructs a `HEAD` request that interprets the body as text stream
|
1409 | * and returns the full `HttpResponse`.
|
1410 | *
|
1411 | * @param url The endpoint URL.
|
1412 | * @param options The HTTP options to send with the request.
|
1413 | *
|
1414 | * @return An `Observable` of the `HttpResponse` for the request,
|
1415 | * with the response body of type string.
|
1416 | */
|
1417 | head(url: string, options: {
|
1418 | headers?: HttpHeaders | {
|
1419 | [header: string]: string | string[];
|
1420 | };
|
1421 | observe: 'response';
|
1422 | context?: HttpContext;
|
1423 | params?: HttpParams | {
|
1424 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1425 | };
|
1426 | reportProgress?: boolean;
|
1427 | responseType: 'text';
|
1428 | withCredentials?: boolean;
|
1429 | }): Observable<HttpResponse<string>>;
|
1430 | /**
|
1431 | * Constructs a `HEAD` request that interprets the body as JSON and
|
1432 | * returns the full `HttpResponse`.
|
1433 | *
|
1434 | * @param url The endpoint URL.
|
1435 | * @param options The HTTP options to send with the request.
|
1436 | *
|
1437 | * @return An `Observable` of the `HttpResponse` for the request,
|
1438 | * with the response body of type `Object`.
|
1439 | */
|
1440 | head(url: string, options: {
|
1441 | headers?: HttpHeaders | {
|
1442 | [header: string]: string | string[];
|
1443 | };
|
1444 | observe: 'response';
|
1445 | context?: HttpContext;
|
1446 | params?: HttpParams | {
|
1447 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1448 | };
|
1449 | reportProgress?: boolean;
|
1450 | responseType?: 'json';
|
1451 | withCredentials?: boolean;
|
1452 | }): Observable<HttpResponse<Object>>;
|
1453 | /**
|
1454 | * Constructs a `HEAD` request that interprets the body as JSON
|
1455 | * and returns the full `HttpResponse`.
|
1456 | *
|
1457 | * @param url The endpoint URL.
|
1458 | * @param options The HTTP options to send with the request.
|
1459 | *
|
1460 | * @return An `Observable` of the `HttpResponse` for the request,
|
1461 | * with a response body of the requested type.
|
1462 | */
|
1463 | head<T>(url: string, options: {
|
1464 | headers?: HttpHeaders | {
|
1465 | [header: string]: string | string[];
|
1466 | };
|
1467 | observe: 'response';
|
1468 | context?: HttpContext;
|
1469 | params?: HttpParams | {
|
1470 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1471 | };
|
1472 | reportProgress?: boolean;
|
1473 | responseType?: 'json';
|
1474 | withCredentials?: boolean;
|
1475 | }): Observable<HttpResponse<T>>;
|
1476 | /**
|
1477 |
|
1478 | * Constructs a `HEAD` request that interprets the body as JSON and
|
1479 | * returns the response body as an object parsed from JSON.
|
1480 | *
|
1481 | * @param url The endpoint URL.
|
1482 | * @param options The HTTP options to send with the request.
|
1483 | *
|
1484 | * @return An `Observable` of the response, with the response body as an object parsed from JSON.
|
1485 | */
|
1486 | head(url: string, options?: {
|
1487 | headers?: HttpHeaders | {
|
1488 | [header: string]: string | string[];
|
1489 | };
|
1490 | context?: HttpContext;
|
1491 | observe?: 'body';
|
1492 | params?: HttpParams | {
|
1493 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1494 | };
|
1495 | reportProgress?: boolean;
|
1496 | responseType?: 'json';
|
1497 | withCredentials?: boolean;
|
1498 | }): Observable<Object>;
|
1499 | /**
|
1500 | * Constructs a `HEAD` request that interprets the body as JSON and returns
|
1501 | * the response in a given type.
|
1502 | *
|
1503 | * @param url The endpoint URL.
|
1504 | * @param options The HTTP options to send with the request.
|
1505 | *
|
1506 | * @return An `Observable` of the `HttpResponse` for the request,
|
1507 | * with a response body of the given type.
|
1508 | */
|
1509 | head<T>(url: string, options?: {
|
1510 | headers?: HttpHeaders | {
|
1511 | [header: string]: string | string[];
|
1512 | };
|
1513 | context?: HttpContext;
|
1514 | observe?: 'body';
|
1515 | params?: HttpParams | {
|
1516 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1517 | };
|
1518 | reportProgress?: boolean;
|
1519 | responseType?: 'json';
|
1520 | withCredentials?: boolean;
|
1521 | }): Observable<T>;
|
1522 | /**
|
1523 | * Constructs a `JSONP` request for the given URL and name of the callback parameter.
|
1524 | *
|
1525 | * @param url The resource URL.
|
1526 | * @param callbackParam The callback function name.
|
1527 | *
|
1528 | * @return An `Observable` of the response object, with response body as an object.
|
1529 | */
|
1530 | jsonp(url: string, callbackParam: string): Observable<Object>;
|
1531 | /**
|
1532 | * Constructs a `JSONP` request for the given URL and name of the callback parameter.
|
1533 | *
|
1534 | * @param url The resource URL.
|
1535 | * @param callbackParam The callback function name.
|
1536 | *
|
1537 | * You must install a suitable interceptor, such as one provided by `HttpClientJsonpModule`.
|
1538 | * If no such interceptor is reached,
|
1539 | * then the `JSONP` request can be rejected by the configured backend.
|
1540 | *
|
1541 | * @return An `Observable` of the response object, with response body in the requested type.
|
1542 | */
|
1543 | jsonp<T>(url: string, callbackParam: string): Observable<T>;
|
1544 | /**
|
1545 | * Constructs an `OPTIONS` request that interprets the body as an
|
1546 | * `ArrayBuffer` and returns the response as an `ArrayBuffer`.
|
1547 | *
|
1548 | * @param url The endpoint URL.
|
1549 | * @param options HTTP options.
|
1550 | *
|
1551 | * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
|
1552 | */
|
1553 | options(url: string, options: {
|
1554 | headers?: HttpHeaders | {
|
1555 | [header: string]: string | string[];
|
1556 | };
|
1557 | context?: HttpContext;
|
1558 | observe?: 'body';
|
1559 | params?: HttpParams | {
|
1560 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1561 | };
|
1562 | reportProgress?: boolean;
|
1563 | responseType: 'arraybuffer';
|
1564 | withCredentials?: boolean;
|
1565 | }): Observable<ArrayBuffer>;
|
1566 | /**
|
1567 | * Constructs an `OPTIONS` request that interprets the body as a `Blob` and returns
|
1568 | * the response as a `Blob`.
|
1569 | *
|
1570 | * @param url The endpoint URL.
|
1571 | * @param options HTTP options.
|
1572 | *
|
1573 | * @return An `Observable` of the response, with the response body as a `Blob`.
|
1574 | */
|
1575 | options(url: string, options: {
|
1576 | headers?: HttpHeaders | {
|
1577 | [header: string]: string | string[];
|
1578 | };
|
1579 | context?: HttpContext;
|
1580 | observe?: 'body';
|
1581 | params?: HttpParams | {
|
1582 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1583 | };
|
1584 | reportProgress?: boolean;
|
1585 | responseType: 'blob';
|
1586 | withCredentials?: boolean;
|
1587 | }): Observable<Blob>;
|
1588 | /**
|
1589 | * Constructs an `OPTIONS` request that interprets the body as a text string and
|
1590 | * returns a string value.
|
1591 | *
|
1592 | * @param url The endpoint URL.
|
1593 | * @param options HTTP options.
|
1594 | *
|
1595 | * @return An `Observable` of the response, with the response body of type string.
|
1596 | */
|
1597 | options(url: string, options: {
|
1598 | headers?: HttpHeaders | {
|
1599 | [header: string]: string | string[];
|
1600 | };
|
1601 | context?: HttpContext;
|
1602 | observe?: 'body';
|
1603 | params?: HttpParams | {
|
1604 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1605 | };
|
1606 | reportProgress?: boolean;
|
1607 | responseType: 'text';
|
1608 | withCredentials?: boolean;
|
1609 | }): Observable<string>;
|
1610 | /**
|
1611 | * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`
|
1612 | * and returns the full event stream.
|
1613 | *
|
1614 | * @param url The endpoint URL.
|
1615 | * @param options HTTP options.
|
1616 | *
|
1617 | * @return An `Observable` of all `HttpEvent`s for the request,
|
1618 | * with the response body as an `ArrayBuffer`.
|
1619 | */
|
1620 | options(url: string, options: {
|
1621 | headers?: HttpHeaders | {
|
1622 | [header: string]: string | string[];
|
1623 | };
|
1624 | observe: 'events';
|
1625 | context?: HttpContext;
|
1626 | params?: HttpParams | {
|
1627 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1628 | };
|
1629 | reportProgress?: boolean;
|
1630 | responseType: 'arraybuffer';
|
1631 | withCredentials?: boolean;
|
1632 | }): Observable<HttpEvent<ArrayBuffer>>;
|
1633 | /**
|
1634 | * Constructs an `OPTIONS` request that interprets the body as a `Blob` and
|
1635 | * returns the full event stream.
|
1636 | *
|
1637 | * @param url The endpoint URL.
|
1638 | * @param options HTTP options.
|
1639 | *
|
1640 | * @return An `Observable` of all `HttpEvent`s for the request,
|
1641 | * with the response body as a `Blob`.
|
1642 | */
|
1643 | options(url: string, options: {
|
1644 | headers?: HttpHeaders | {
|
1645 | [header: string]: string | string[];
|
1646 | };
|
1647 | observe: 'events';
|
1648 | context?: HttpContext;
|
1649 | params?: HttpParams | {
|
1650 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1651 | };
|
1652 | reportProgress?: boolean;
|
1653 | responseType: 'blob';
|
1654 | withCredentials?: boolean;
|
1655 | }): Observable<HttpEvent<Blob>>;
|
1656 | /**
|
1657 | * Constructs an `OPTIONS` request that interprets the body as a text string
|
1658 | * and returns the full event stream.
|
1659 | *
|
1660 | * @param url The endpoint URL.
|
1661 | * @param options HTTP options.
|
1662 | *
|
1663 | * @return An `Observable` of all the `HttpEvent`s for the request,
|
1664 | * with the response body of type string.
|
1665 | */
|
1666 | options(url: string, options: {
|
1667 | headers?: HttpHeaders | {
|
1668 | [header: string]: string | string[];
|
1669 | };
|
1670 | observe: 'events';
|
1671 | context?: HttpContext;
|
1672 | params?: HttpParams | {
|
1673 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1674 | };
|
1675 | reportProgress?: boolean;
|
1676 | responseType: 'text';
|
1677 | withCredentials?: boolean;
|
1678 | }): Observable<HttpEvent<string>>;
|
1679 | /**
|
1680 | * Constructs an `OPTIONS` request that interprets the body as JSON
|
1681 | * and returns the full event stream.
|
1682 | *
|
1683 | * @param url The endpoint URL.
|
1684 | * @param options HTTP options.
|
1685 | *
|
1686 | * @return An `Observable` of all the `HttpEvent`s for the request with the response
|
1687 | * body of type `Object`.
|
1688 | */
|
1689 | options(url: string, options: {
|
1690 | headers?: HttpHeaders | {
|
1691 | [header: string]: string | string[];
|
1692 | };
|
1693 | observe: 'events';
|
1694 | context?: HttpContext;
|
1695 | params?: HttpParams | {
|
1696 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1697 | };
|
1698 | reportProgress?: boolean;
|
1699 | responseType?: 'json';
|
1700 | withCredentials?: boolean;
|
1701 | }): Observable<HttpEvent<Object>>;
|
1702 | /**
|
1703 | * Constructs an `OPTIONS` request that interprets the body as JSON and
|
1704 | * returns the full event stream.
|
1705 | *
|
1706 | * @param url The endpoint URL.
|
1707 | * @param options HTTP options.
|
1708 | *
|
1709 | * @return An `Observable` of all the `HttpEvent`s for the request,
|
1710 | * with a response body in the requested type.
|
1711 | */
|
1712 | options<T>(url: string, options: {
|
1713 | headers?: HttpHeaders | {
|
1714 | [header: string]: string | string[];
|
1715 | };
|
1716 | observe: 'events';
|
1717 | context?: HttpContext;
|
1718 | params?: HttpParams | {
|
1719 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1720 | };
|
1721 | reportProgress?: boolean;
|
1722 | responseType?: 'json';
|
1723 | withCredentials?: boolean;
|
1724 | }): Observable<HttpEvent<T>>;
|
1725 | /**
|
1726 | * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`
|
1727 | * and returns the full HTTP response.
|
1728 | *
|
1729 | * @param url The endpoint URL.
|
1730 | * @param options HTTP options.
|
1731 | *
|
1732 | * @return An `Observable` of the `HttpResponse` for the request,
|
1733 | * with the response body as an `ArrayBuffer`.
|
1734 | */
|
1735 | options(url: string, options: {
|
1736 | headers?: HttpHeaders | {
|
1737 | [header: string]: string | string[];
|
1738 | };
|
1739 | observe: 'response';
|
1740 | context?: HttpContext;
|
1741 | params?: HttpParams | {
|
1742 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1743 | };
|
1744 | reportProgress?: boolean;
|
1745 | responseType: 'arraybuffer';
|
1746 | withCredentials?: boolean;
|
1747 | }): Observable<HttpResponse<ArrayBuffer>>;
|
1748 | /**
|
1749 | * Constructs an `OPTIONS` request that interprets the body as a `Blob`
|
1750 | * and returns the full `HttpResponse`.
|
1751 | *
|
1752 | * @param url The endpoint URL.
|
1753 | * @param options HTTP options.
|
1754 | *
|
1755 | * @return An `Observable` of the `HttpResponse` for the request,
|
1756 | * with the response body as a `Blob`.
|
1757 | */
|
1758 | options(url: string, options: {
|
1759 | headers?: HttpHeaders | {
|
1760 | [header: string]: string | string[];
|
1761 | };
|
1762 | observe: 'response';
|
1763 | context?: HttpContext;
|
1764 | params?: HttpParams | {
|
1765 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1766 | };
|
1767 | reportProgress?: boolean;
|
1768 | responseType: 'blob';
|
1769 | withCredentials?: boolean;
|
1770 | }): Observable<HttpResponse<Blob>>;
|
1771 | /**
|
1772 | * Constructs an `OPTIONS` request that interprets the body as text stream
|
1773 | * and returns the full `HttpResponse`.
|
1774 | *
|
1775 | * @param url The endpoint URL.
|
1776 | * @param options HTTP options.
|
1777 | *
|
1778 | * @return An `Observable` of the `HttpResponse` for the request,
|
1779 | * with the response body of type string.
|
1780 | */
|
1781 | options(url: string, options: {
|
1782 | headers?: HttpHeaders | {
|
1783 | [header: string]: string | string[];
|
1784 | };
|
1785 | observe: 'response';
|
1786 | context?: HttpContext;
|
1787 | params?: HttpParams | {
|
1788 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1789 | };
|
1790 | reportProgress?: boolean;
|
1791 | responseType: 'text';
|
1792 | withCredentials?: boolean;
|
1793 | }): Observable<HttpResponse<string>>;
|
1794 | /**
|
1795 | * Constructs an `OPTIONS` request that interprets the body as JSON
|
1796 | * and returns the full `HttpResponse`.
|
1797 | *
|
1798 | * @param url The endpoint URL.
|
1799 | * @param options HTTP options.
|
1800 | *
|
1801 | * @return An `Observable` of the `HttpResponse` for the request,
|
1802 | * with the response body of type `Object`.
|
1803 | */
|
1804 | options(url: string, options: {
|
1805 | headers?: HttpHeaders | {
|
1806 | [header: string]: string | string[];
|
1807 | };
|
1808 | observe: 'response';
|
1809 | context?: HttpContext;
|
1810 | params?: HttpParams | {
|
1811 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1812 | };
|
1813 | reportProgress?: boolean;
|
1814 | responseType?: 'json';
|
1815 | withCredentials?: boolean;
|
1816 | }): Observable<HttpResponse<Object>>;
|
1817 | /**
|
1818 | * Constructs an `OPTIONS` request that interprets the body as JSON and
|
1819 | * returns the full `HttpResponse`.
|
1820 | *
|
1821 | * @param url The endpoint URL.
|
1822 | * @param options HTTP options.
|
1823 | *
|
1824 | * @return An `Observable` of the `HttpResponse` for the request,
|
1825 | * with a response body in the requested type.
|
1826 | */
|
1827 | options<T>(url: string, options: {
|
1828 | headers?: HttpHeaders | {
|
1829 | [header: string]: string | string[];
|
1830 | };
|
1831 | observe: 'response';
|
1832 | context?: HttpContext;
|
1833 | params?: HttpParams | {
|
1834 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1835 | };
|
1836 | reportProgress?: boolean;
|
1837 | responseType?: 'json';
|
1838 | withCredentials?: boolean;
|
1839 | }): Observable<HttpResponse<T>>;
|
1840 | /**
|
1841 |
|
1842 | * Constructs an `OPTIONS` request that interprets the body as JSON and returns the
|
1843 | * response body as an object parsed from JSON.
|
1844 | *
|
1845 | * @param url The endpoint URL.
|
1846 | * @param options HTTP options.
|
1847 | *
|
1848 | * @return An `Observable` of the response, with the response body as an object parsed from JSON.
|
1849 | */
|
1850 | options(url: string, options?: {
|
1851 | headers?: HttpHeaders | {
|
1852 | [header: string]: string | string[];
|
1853 | };
|
1854 | context?: HttpContext;
|
1855 | observe?: 'body';
|
1856 | params?: HttpParams | {
|
1857 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1858 | };
|
1859 | reportProgress?: boolean;
|
1860 | responseType?: 'json';
|
1861 | withCredentials?: boolean;
|
1862 | }): Observable<Object>;
|
1863 | /**
|
1864 | * Constructs an `OPTIONS` request that interprets the body as JSON and returns the
|
1865 | * response in a given type.
|
1866 | *
|
1867 | * @param url The endpoint URL.
|
1868 | * @param options HTTP options.
|
1869 | *
|
1870 | * @return An `Observable` of the `HttpResponse`, with a response body of the given type.
|
1871 | */
|
1872 | options<T>(url: string, options?: {
|
1873 | headers?: HttpHeaders | {
|
1874 | [header: string]: string | string[];
|
1875 | };
|
1876 | context?: HttpContext;
|
1877 | observe?: 'body';
|
1878 | params?: HttpParams | {
|
1879 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1880 | };
|
1881 | reportProgress?: boolean;
|
1882 | responseType?: 'json';
|
1883 | withCredentials?: boolean;
|
1884 | }): Observable<T>;
|
1885 | /**
|
1886 | * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and returns
|
1887 | * the response as an `ArrayBuffer`.
|
1888 | *
|
1889 | * @param url The endpoint URL.
|
1890 | * @param body The resources to edit.
|
1891 | * @param options HTTP options.
|
1892 | *
|
1893 | * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
|
1894 | */
|
1895 | patch(url: string, body: any | null, options: {
|
1896 | headers?: HttpHeaders | {
|
1897 | [header: string]: string | string[];
|
1898 | };
|
1899 | context?: HttpContext;
|
1900 | observe?: 'body';
|
1901 | params?: HttpParams | {
|
1902 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1903 | };
|
1904 | reportProgress?: boolean;
|
1905 | responseType: 'arraybuffer';
|
1906 | withCredentials?: boolean;
|
1907 | }): Observable<ArrayBuffer>;
|
1908 | /**
|
1909 | * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the response
|
1910 | * as a `Blob`.
|
1911 | *
|
1912 | * @param url The endpoint URL.
|
1913 | * @param body The resources to edit.
|
1914 | * @param options HTTP options.
|
1915 | *
|
1916 | * @return An `Observable` of the response, with the response body as a `Blob`.
|
1917 | */
|
1918 | patch(url: string, body: any | null, options: {
|
1919 | headers?: HttpHeaders | {
|
1920 | [header: string]: string | string[];
|
1921 | };
|
1922 | context?: HttpContext;
|
1923 | observe?: 'body';
|
1924 | params?: HttpParams | {
|
1925 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1926 | };
|
1927 | reportProgress?: boolean;
|
1928 | responseType: 'blob';
|
1929 | withCredentials?: boolean;
|
1930 | }): Observable<Blob>;
|
1931 | /**
|
1932 | * Constructs a `PATCH` request that interprets the body as a text string and
|
1933 | * returns the response as a string value.
|
1934 | *
|
1935 | * @param url The endpoint URL.
|
1936 | * @param body The resources to edit.
|
1937 | * @param options HTTP options.
|
1938 | *
|
1939 | * @return An `Observable` of the response, with a response body of type string.
|
1940 | */
|
1941 | patch(url: string, body: any | null, options: {
|
1942 | headers?: HttpHeaders | {
|
1943 | [header: string]: string | string[];
|
1944 | };
|
1945 | context?: HttpContext;
|
1946 | observe?: 'body';
|
1947 | params?: HttpParams | {
|
1948 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1949 | };
|
1950 | reportProgress?: boolean;
|
1951 | responseType: 'text';
|
1952 | withCredentials?: boolean;
|
1953 | }): Observable<string>;
|
1954 | /**
|
1955 | * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and
|
1956 | * returns the full event stream.
|
1957 | *
|
1958 | * @param url The endpoint URL.
|
1959 | * @param body The resources to edit.
|
1960 | * @param options HTTP options.
|
1961 | *
|
1962 | * @return An `Observable` of all the `HttpEvent`s for the request,
|
1963 | * with the response body as an `ArrayBuffer`.
|
1964 | */
|
1965 | patch(url: string, body: any | null, options: {
|
1966 | headers?: HttpHeaders | {
|
1967 | [header: string]: string | string[];
|
1968 | };
|
1969 | observe: 'events';
|
1970 | context?: HttpContext;
|
1971 | params?: HttpParams | {
|
1972 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1973 | };
|
1974 | reportProgress?: boolean;
|
1975 | responseType: 'arraybuffer';
|
1976 | withCredentials?: boolean;
|
1977 | }): Observable<HttpEvent<ArrayBuffer>>;
|
1978 | /**
|
1979 | * Constructs a `PATCH` request that interprets the body as a `Blob`
|
1980 | * and returns the full event stream.
|
1981 | *
|
1982 | * @param url The endpoint URL.
|
1983 | * @param body The resources to edit.
|
1984 | * @param options HTTP options.
|
1985 | *
|
1986 | * @return An `Observable` of all the `HttpEvent`s for the request, with the
|
1987 | * response body as `Blob`.
|
1988 | */
|
1989 | patch(url: string, body: any | null, options: {
|
1990 | headers?: HttpHeaders | {
|
1991 | [header: string]: string | string[];
|
1992 | };
|
1993 | observe: 'events';
|
1994 | context?: HttpContext;
|
1995 | params?: HttpParams | {
|
1996 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
1997 | };
|
1998 | reportProgress?: boolean;
|
1999 | responseType: 'blob';
|
2000 | withCredentials?: boolean;
|
2001 | }): Observable<HttpEvent<Blob>>;
|
2002 | /**
|
2003 | * Constructs a `PATCH` request that interprets the body as a text string and
|
2004 | * returns the full event stream.
|
2005 | *
|
2006 | * @param url The endpoint URL.
|
2007 | * @param body The resources to edit.
|
2008 | * @param options HTTP options.
|
2009 | *
|
2010 | * @return An `Observable` of all the `HttpEvent`s for the request, with a
|
2011 | * response body of type string.
|
2012 | */
|
2013 | patch(url: string, body: any | null, options: {
|
2014 | headers?: HttpHeaders | {
|
2015 | [header: string]: string | string[];
|
2016 | };
|
2017 | observe: 'events';
|
2018 | context?: HttpContext;
|
2019 | params?: HttpParams | {
|
2020 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2021 | };
|
2022 | reportProgress?: boolean;
|
2023 | responseType: 'text';
|
2024 | withCredentials?: boolean;
|
2025 | }): Observable<HttpEvent<string>>;
|
2026 | /**
|
2027 | * Constructs a `PATCH` request that interprets the body as JSON
|
2028 | * and returns the full event stream.
|
2029 | *
|
2030 | * @param url The endpoint URL.
|
2031 | * @param body The resources to edit.
|
2032 | * @param options HTTP options.
|
2033 | *
|
2034 | * @return An `Observable` of all the `HttpEvent`s for the request,
|
2035 | * with a response body of type `Object`.
|
2036 | */
|
2037 | patch(url: string, body: any | null, options: {
|
2038 | headers?: HttpHeaders | {
|
2039 | [header: string]: string | string[];
|
2040 | };
|
2041 | observe: 'events';
|
2042 | context?: HttpContext;
|
2043 | params?: HttpParams | {
|
2044 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2045 | };
|
2046 | reportProgress?: boolean;
|
2047 | responseType?: 'json';
|
2048 | withCredentials?: boolean;
|
2049 | }): Observable<HttpEvent<Object>>;
|
2050 | /**
|
2051 | * Constructs a `PATCH` request that interprets the body as JSON
|
2052 | * and returns the full event stream.
|
2053 | *
|
2054 | * @param url The endpoint URL.
|
2055 | * @param body The resources to edit.
|
2056 | * @param options HTTP options.
|
2057 | *
|
2058 | * @return An `Observable` of all the `HttpEvent`s for the request,
|
2059 | * with a response body in the requested type.
|
2060 | */
|
2061 | patch<T>(url: string, body: any | null, options: {
|
2062 | headers?: HttpHeaders | {
|
2063 | [header: string]: string | string[];
|
2064 | };
|
2065 | observe: 'events';
|
2066 | context?: HttpContext;
|
2067 | params?: HttpParams | {
|
2068 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2069 | };
|
2070 | reportProgress?: boolean;
|
2071 | responseType?: 'json';
|
2072 | withCredentials?: boolean;
|
2073 | }): Observable<HttpEvent<T>>;
|
2074 | /**
|
2075 | * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer`
|
2076 | * and returns the full `HttpResponse`.
|
2077 | *
|
2078 | * @param url The endpoint URL.
|
2079 | * @param body The resources to edit.
|
2080 | * @param options HTTP options.
|
2081 | *
|
2082 | * @return An `Observable` of the `HttpResponse` for the request,
|
2083 | * with the response body as an `ArrayBuffer`.
|
2084 | */
|
2085 | patch(url: string, body: any | null, options: {
|
2086 | headers?: HttpHeaders | {
|
2087 | [header: string]: string | string[];
|
2088 | };
|
2089 | observe: 'response';
|
2090 | context?: HttpContext;
|
2091 | params?: HttpParams | {
|
2092 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2093 | };
|
2094 | reportProgress?: boolean;
|
2095 | responseType: 'arraybuffer';
|
2096 | withCredentials?: boolean;
|
2097 | }): Observable<HttpResponse<ArrayBuffer>>;
|
2098 | /**
|
2099 | * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the full
|
2100 | * `HttpResponse`.
|
2101 | *
|
2102 | * @param url The endpoint URL.
|
2103 | * @param body The resources to edit.
|
2104 | * @param options HTTP options.
|
2105 | *
|
2106 | * @return An `Observable` of the `HttpResponse` for the request,
|
2107 | * with the response body as a `Blob`.
|
2108 | */
|
2109 | patch(url: string, body: any | null, options: {
|
2110 | headers?: HttpHeaders | {
|
2111 | [header: string]: string | string[];
|
2112 | };
|
2113 | observe: 'response';
|
2114 | context?: HttpContext;
|
2115 | params?: HttpParams | {
|
2116 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2117 | };
|
2118 | reportProgress?: boolean;
|
2119 | responseType: 'blob';
|
2120 | withCredentials?: boolean;
|
2121 | }): Observable<HttpResponse<Blob>>;
|
2122 | /**
|
2123 | * Constructs a `PATCH` request that interprets the body as a text stream and returns the
|
2124 | * full `HttpResponse`.
|
2125 | *
|
2126 | * @param url The endpoint URL.
|
2127 | * @param body The resources to edit.
|
2128 | * @param options HTTP options.
|
2129 | *
|
2130 | * @return An `Observable` of the `HttpResponse` for the request,
|
2131 | * with a response body of type string.
|
2132 | */
|
2133 | patch(url: string, body: any | null, options: {
|
2134 | headers?: HttpHeaders | {
|
2135 | [header: string]: string | string[];
|
2136 | };
|
2137 | observe: 'response';
|
2138 | context?: HttpContext;
|
2139 | params?: HttpParams | {
|
2140 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2141 | };
|
2142 | reportProgress?: boolean;
|
2143 | responseType: 'text';
|
2144 | withCredentials?: boolean;
|
2145 | }): Observable<HttpResponse<string>>;
|
2146 | /**
|
2147 | * Constructs a `PATCH` request that interprets the body as JSON
|
2148 | * and returns the full `HttpResponse`.
|
2149 | *
|
2150 | * @param url The endpoint URL.
|
2151 | * @param body The resources to edit.
|
2152 | * @param options HTTP options.
|
2153 | *
|
2154 | * @return An `Observable` of the `HttpResponse` for the request,
|
2155 | * with a response body in the requested type.
|
2156 | */
|
2157 | patch(url: string, body: any | null, options: {
|
2158 | headers?: HttpHeaders | {
|
2159 | [header: string]: string | string[];
|
2160 | };
|
2161 | observe: 'response';
|
2162 | context?: HttpContext;
|
2163 | params?: HttpParams | {
|
2164 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2165 | };
|
2166 | reportProgress?: boolean;
|
2167 | responseType?: 'json';
|
2168 | withCredentials?: boolean;
|
2169 | }): Observable<HttpResponse<Object>>;
|
2170 | /**
|
2171 | * Constructs a `PATCH` request that interprets the body as JSON
|
2172 | * and returns the full `HttpResponse`.
|
2173 | *
|
2174 | * @param url The endpoint URL.
|
2175 | * @param body The resources to edit.
|
2176 | * @param options HTTP options.
|
2177 | *
|
2178 | * @return An `Observable` of the `HttpResponse` for the request,
|
2179 | * with a response body in the given type.
|
2180 | */
|
2181 | patch<T>(url: string, body: any | null, options: {
|
2182 | headers?: HttpHeaders | {
|
2183 | [header: string]: string | string[];
|
2184 | };
|
2185 | observe: 'response';
|
2186 | context?: HttpContext;
|
2187 | params?: HttpParams | {
|
2188 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2189 | };
|
2190 | reportProgress?: boolean;
|
2191 | responseType?: 'json';
|
2192 | withCredentials?: boolean;
|
2193 | }): Observable<HttpResponse<T>>;
|
2194 | /**
|
2195 |
|
2196 | * Constructs a `PATCH` request that interprets the body as JSON and
|
2197 | * returns the response body as an object parsed from JSON.
|
2198 | *
|
2199 | * @param url The endpoint URL.
|
2200 | * @param body The resources to edit.
|
2201 | * @param options HTTP options.
|
2202 | *
|
2203 | * @return An `Observable` of the response, with the response body as an object parsed from JSON.
|
2204 | */
|
2205 | patch(url: string, body: any | null, options?: {
|
2206 | headers?: HttpHeaders | {
|
2207 | [header: string]: string | string[];
|
2208 | };
|
2209 | context?: HttpContext;
|
2210 | observe?: 'body';
|
2211 | params?: HttpParams | {
|
2212 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2213 | };
|
2214 | reportProgress?: boolean;
|
2215 | responseType?: 'json';
|
2216 | withCredentials?: boolean;
|
2217 | }): Observable<Object>;
|
2218 | /**
|
2219 | * Constructs a `PATCH` request that interprets the body as JSON
|
2220 | * and returns the response in a given type.
|
2221 | *
|
2222 | * @param url The endpoint URL.
|
2223 | * @param body The resources to edit.
|
2224 | * @param options HTTP options.
|
2225 | *
|
2226 | * @return An `Observable` of the `HttpResponse` for the request,
|
2227 | * with a response body in the given type.
|
2228 | */
|
2229 | patch<T>(url: string, body: any | null, options?: {
|
2230 | headers?: HttpHeaders | {
|
2231 | [header: string]: string | string[];
|
2232 | };
|
2233 | context?: HttpContext;
|
2234 | observe?: 'body';
|
2235 | params?: HttpParams | {
|
2236 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2237 | };
|
2238 | reportProgress?: boolean;
|
2239 | responseType?: 'json';
|
2240 | withCredentials?: boolean;
|
2241 | }): Observable<T>;
|
2242 | /**
|
2243 | * Constructs a `POST` request that interprets the body as an `ArrayBuffer` and returns
|
2244 | * an `ArrayBuffer`.
|
2245 | *
|
2246 | * @param url The endpoint URL.
|
2247 | * @param body The content to replace with.
|
2248 | * @param options HTTP options.
|
2249 | *
|
2250 | * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
|
2251 | */
|
2252 | post(url: string, body: any | null, options: {
|
2253 | headers?: HttpHeaders | {
|
2254 | [header: string]: string | string[];
|
2255 | };
|
2256 | context?: HttpContext;
|
2257 | observe?: 'body';
|
2258 | params?: HttpParams | {
|
2259 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2260 | };
|
2261 | reportProgress?: boolean;
|
2262 | responseType: 'arraybuffer';
|
2263 | withCredentials?: boolean;
|
2264 | }): Observable<ArrayBuffer>;
|
2265 | /**
|
2266 | * Constructs a `POST` request that interprets the body as a `Blob` and returns the
|
2267 | * response as a `Blob`.
|
2268 | *
|
2269 | * @param url The endpoint URL.
|
2270 | * @param body The content to replace with.
|
2271 | * @param options HTTP options
|
2272 | *
|
2273 | * @return An `Observable` of the response, with the response body as a `Blob`.
|
2274 | */
|
2275 | post(url: string, body: any | null, options: {
|
2276 | headers?: HttpHeaders | {
|
2277 | [header: string]: string | string[];
|
2278 | };
|
2279 | context?: HttpContext;
|
2280 | observe?: 'body';
|
2281 | params?: HttpParams | {
|
2282 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2283 | };
|
2284 | reportProgress?: boolean;
|
2285 | responseType: 'blob';
|
2286 | withCredentials?: boolean;
|
2287 | }): Observable<Blob>;
|
2288 | /**
|
2289 | * Constructs a `POST` request that interprets the body as a text string and
|
2290 | * returns the response as a string value.
|
2291 | *
|
2292 | * @param url The endpoint URL.
|
2293 | * @param body The content to replace with.
|
2294 | * @param options HTTP options
|
2295 | *
|
2296 | * @return An `Observable` of the response, with a response body of type string.
|
2297 | */
|
2298 | post(url: string, body: any | null, options: {
|
2299 | headers?: HttpHeaders | {
|
2300 | [header: string]: string | string[];
|
2301 | };
|
2302 | context?: HttpContext;
|
2303 | observe?: 'body';
|
2304 | params?: HttpParams | {
|
2305 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2306 | };
|
2307 | reportProgress?: boolean;
|
2308 | responseType: 'text';
|
2309 | withCredentials?: boolean;
|
2310 | }): Observable<string>;
|
2311 | /**
|
2312 | * Constructs a `POST` request that interprets the body as an `ArrayBuffer` and
|
2313 | * returns the full event stream.
|
2314 | *
|
2315 | * @param url The endpoint URL.
|
2316 | * @param body The content to replace with.
|
2317 | * @param options HTTP options
|
2318 | *
|
2319 | * @return An `Observable` of all `HttpEvent`s for the request,
|
2320 | * with the response body as an `ArrayBuffer`.
|
2321 | */
|
2322 | post(url: string, body: any | null, options: {
|
2323 | headers?: HttpHeaders | {
|
2324 | [header: string]: string | string[];
|
2325 | };
|
2326 | observe: 'events';
|
2327 | context?: HttpContext;
|
2328 | params?: HttpParams | {
|
2329 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2330 | };
|
2331 | reportProgress?: boolean;
|
2332 | responseType: 'arraybuffer';
|
2333 | withCredentials?: boolean;
|
2334 | }): Observable<HttpEvent<ArrayBuffer>>;
|
2335 | /**
|
2336 | * Constructs a `POST` request that interprets the body as a `Blob`
|
2337 | * and returns the response in an observable of the full event stream.
|
2338 | *
|
2339 | * @param url The endpoint URL.
|
2340 | * @param body The content to replace with.
|
2341 | * @param options HTTP options
|
2342 | *
|
2343 | * @return An `Observable` of all `HttpEvent`s for the request, with the response body as `Blob`.
|
2344 | */
|
2345 | post(url: string, body: any | null, options: {
|
2346 | headers?: HttpHeaders | {
|
2347 | [header: string]: string | string[];
|
2348 | };
|
2349 | observe: 'events';
|
2350 | context?: HttpContext;
|
2351 | params?: HttpParams | {
|
2352 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2353 | };
|
2354 | reportProgress?: boolean;
|
2355 | responseType: 'blob';
|
2356 | withCredentials?: boolean;
|
2357 | }): Observable<HttpEvent<Blob>>;
|
2358 | /**
|
2359 | * Constructs a `POST` request that interprets the body as a text string and returns the full
|
2360 | * event stream.
|
2361 | *
|
2362 | * @param url The endpoint URL.
|
2363 | * @param body The content to replace with.
|
2364 | * @param options HTTP options
|
2365 | *
|
2366 | * @return An `Observable` of all `HttpEvent`s for the request,
|
2367 | * with a response body of type string.
|
2368 | */
|
2369 | post(url: string, body: any | null, options: {
|
2370 | headers?: HttpHeaders | {
|
2371 | [header: string]: string | string[];
|
2372 | };
|
2373 | observe: 'events';
|
2374 | context?: HttpContext;
|
2375 | params?: HttpParams | {
|
2376 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2377 | };
|
2378 | reportProgress?: boolean;
|
2379 | responseType: 'text';
|
2380 | withCredentials?: boolean;
|
2381 | }): Observable<HttpEvent<string>>;
|
2382 | /**
|
2383 | * Constructs a POST request that interprets the body as JSON and returns the full
|
2384 | * event stream.
|
2385 | *
|
2386 | * @param url The endpoint URL.
|
2387 | * @param body The content to replace with.
|
2388 | * @param options HTTP options
|
2389 | *
|
2390 | * @return An `Observable` of all `HttpEvent`s for the request,
|
2391 | * with a response body of type `Object`.
|
2392 | */
|
2393 | post(url: string, body: any | null, options: {
|
2394 | headers?: HttpHeaders | {
|
2395 | [header: string]: string | string[];
|
2396 | };
|
2397 | observe: 'events';
|
2398 | context?: HttpContext;
|
2399 | params?: HttpParams | {
|
2400 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2401 | };
|
2402 | reportProgress?: boolean;
|
2403 | responseType?: 'json';
|
2404 | withCredentials?: boolean;
|
2405 | }): Observable<HttpEvent<Object>>;
|
2406 | /**
|
2407 | * Constructs a POST request that interprets the body as JSON and returns the full
|
2408 | * event stream.
|
2409 | *
|
2410 | * @param url The endpoint URL.
|
2411 | * @param body The content to replace with.
|
2412 | * @param options HTTP options
|
2413 | *
|
2414 | * @return An `Observable` of all `HttpEvent`s for the request,
|
2415 | * with a response body in the requested type.
|
2416 | */
|
2417 | post<T>(url: string, body: any | null, options: {
|
2418 | headers?: HttpHeaders | {
|
2419 | [header: string]: string | string[];
|
2420 | };
|
2421 | observe: 'events';
|
2422 | context?: HttpContext;
|
2423 | params?: HttpParams | {
|
2424 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2425 | };
|
2426 | reportProgress?: boolean;
|
2427 | responseType?: 'json';
|
2428 | withCredentials?: boolean;
|
2429 | }): Observable<HttpEvent<T>>;
|
2430 | /**
|
2431 | * Constructs a POST request that interprets the body as an `ArrayBuffer`
|
2432 | * and returns the full `HttpResponse`.
|
2433 | *
|
2434 | * @param url The endpoint URL.
|
2435 | * @param body The content to replace with.
|
2436 | * @param options HTTP options
|
2437 | *
|
2438 | * @return An `Observable` of the `HttpResponse` for the request, with the response body as an
|
2439 | * `ArrayBuffer`.
|
2440 | */
|
2441 | post(url: string, body: any | null, options: {
|
2442 | headers?: HttpHeaders | {
|
2443 | [header: string]: string | string[];
|
2444 | };
|
2445 | observe: 'response';
|
2446 | context?: HttpContext;
|
2447 | params?: HttpParams | {
|
2448 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2449 | };
|
2450 | reportProgress?: boolean;
|
2451 | responseType: 'arraybuffer';
|
2452 | withCredentials?: boolean;
|
2453 | }): Observable<HttpResponse<ArrayBuffer>>;
|
2454 | /**
|
2455 | * Constructs a `POST` request that interprets the body as a `Blob` and returns the full
|
2456 | * `HttpResponse`.
|
2457 | *
|
2458 | * @param url The endpoint URL.
|
2459 | * @param body The content to replace with.
|
2460 | * @param options HTTP options
|
2461 | *
|
2462 | * @return An `Observable` of the `HttpResponse` for the request,
|
2463 | * with the response body as a `Blob`.
|
2464 | */
|
2465 | post(url: string, body: any | null, options: {
|
2466 | headers?: HttpHeaders | {
|
2467 | [header: string]: string | string[];
|
2468 | };
|
2469 | observe: 'response';
|
2470 | context?: HttpContext;
|
2471 | params?: HttpParams | {
|
2472 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2473 | };
|
2474 | reportProgress?: boolean;
|
2475 | responseType: 'blob';
|
2476 | withCredentials?: boolean;
|
2477 | }): Observable<HttpResponse<Blob>>;
|
2478 | /**
|
2479 | * Constructs a `POST` request that interprets the body as a text stream and returns
|
2480 | * the full `HttpResponse`.
|
2481 | *
|
2482 | * @param url The endpoint URL.
|
2483 | * @param body The content to replace with.
|
2484 | * @param options HTTP options
|
2485 | *
|
2486 | * @return An `Observable` of the `HttpResponse` for the request,
|
2487 | * with a response body of type string.
|
2488 | */
|
2489 | post(url: string, body: any | null, options: {
|
2490 | headers?: HttpHeaders | {
|
2491 | [header: string]: string | string[];
|
2492 | };
|
2493 | observe: 'response';
|
2494 | context?: HttpContext;
|
2495 | params?: HttpParams | {
|
2496 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2497 | };
|
2498 | reportProgress?: boolean;
|
2499 | responseType: 'text';
|
2500 | withCredentials?: boolean;
|
2501 | }): Observable<HttpResponse<string>>;
|
2502 | /**
|
2503 | * Constructs a `POST` request that interprets the body as JSON
|
2504 | * and returns the full `HttpResponse`.
|
2505 | *
|
2506 | * @param url The endpoint URL.
|
2507 | * @param body The content to replace with.
|
2508 | * @param options HTTP options
|
2509 | *
|
2510 | * @return An `Observable` of the `HttpResponse` for the request, with a response body of type
|
2511 | * `Object`.
|
2512 | */
|
2513 | post(url: string, body: any | null, options: {
|
2514 | headers?: HttpHeaders | {
|
2515 | [header: string]: string | string[];
|
2516 | };
|
2517 | observe: 'response';
|
2518 | context?: HttpContext;
|
2519 | params?: HttpParams | {
|
2520 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2521 | };
|
2522 | reportProgress?: boolean;
|
2523 | responseType?: 'json';
|
2524 | withCredentials?: boolean;
|
2525 | }): Observable<HttpResponse<Object>>;
|
2526 | /**
|
2527 | * Constructs a `POST` request that interprets the body as JSON and returns the
|
2528 | * full `HttpResponse`.
|
2529 | *
|
2530 | *
|
2531 | * @param url The endpoint URL.
|
2532 | * @param body The content to replace with.
|
2533 | * @param options HTTP options
|
2534 | *
|
2535 | * @return An `Observable` of the `HttpResponse` for the request, with a response body in the
|
2536 | * requested type.
|
2537 | */
|
2538 | post<T>(url: string, body: any | null, options: {
|
2539 | headers?: HttpHeaders | {
|
2540 | [header: string]: string | string[];
|
2541 | };
|
2542 | observe: 'response';
|
2543 | context?: HttpContext;
|
2544 | params?: HttpParams | {
|
2545 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2546 | };
|
2547 | reportProgress?: boolean;
|
2548 | responseType?: 'json';
|
2549 | withCredentials?: boolean;
|
2550 | }): Observable<HttpResponse<T>>;
|
2551 | /**
|
2552 | * Constructs a `POST` request that interprets the body as JSON
|
2553 | * and returns the response body as an object parsed from JSON.
|
2554 | *
|
2555 | * @param url The endpoint URL.
|
2556 | * @param body The content to replace with.
|
2557 | * @param options HTTP options
|
2558 | *
|
2559 | * @return An `Observable` of the response, with the response body as an object parsed from JSON.
|
2560 | */
|
2561 | post(url: string, body: any | null, options?: {
|
2562 | headers?: HttpHeaders | {
|
2563 | [header: string]: string | string[];
|
2564 | };
|
2565 | context?: HttpContext;
|
2566 | observe?: 'body';
|
2567 | params?: HttpParams | {
|
2568 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2569 | };
|
2570 | reportProgress?: boolean;
|
2571 | responseType?: 'json';
|
2572 | withCredentials?: boolean;
|
2573 | }): Observable<Object>;
|
2574 | /**
|
2575 | * Constructs a `POST` request that interprets the body as JSON
|
2576 | * and returns an observable of the response.
|
2577 | *
|
2578 | * @param url The endpoint URL.
|
2579 | * @param body The content to replace with.
|
2580 | * @param options HTTP options
|
2581 | *
|
2582 | * @return An `Observable` of the `HttpResponse` for the request, with a response body in the
|
2583 | * requested type.
|
2584 | */
|
2585 | post<T>(url: string, body: any | null, options?: {
|
2586 | headers?: HttpHeaders | {
|
2587 | [header: string]: string | string[];
|
2588 | };
|
2589 | context?: HttpContext;
|
2590 | observe?: 'body';
|
2591 | params?: HttpParams | {
|
2592 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2593 | };
|
2594 | reportProgress?: boolean;
|
2595 | responseType?: 'json';
|
2596 | withCredentials?: boolean;
|
2597 | }): Observable<T>;
|
2598 | /**
|
2599 | * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and returns the
|
2600 | * response as an `ArrayBuffer`.
|
2601 | *
|
2602 | * @param url The endpoint URL.
|
2603 | * @param body The resources to add/update.
|
2604 | * @param options HTTP options
|
2605 | *
|
2606 | * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
|
2607 | */
|
2608 | put(url: string, body: any | null, options: {
|
2609 | headers?: HttpHeaders | {
|
2610 | [header: string]: string | string[];
|
2611 | };
|
2612 | context?: HttpContext;
|
2613 | observe?: 'body';
|
2614 | params?: HttpParams | {
|
2615 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2616 | };
|
2617 | reportProgress?: boolean;
|
2618 | responseType: 'arraybuffer';
|
2619 | withCredentials?: boolean;
|
2620 | }): Observable<ArrayBuffer>;
|
2621 | /**
|
2622 | * Constructs a `PUT` request that interprets the body as a `Blob` and returns
|
2623 | * the response as a `Blob`.
|
2624 | *
|
2625 | * @param url The endpoint URL.
|
2626 | * @param body The resources to add/update.
|
2627 | * @param options HTTP options
|
2628 | *
|
2629 | * @return An `Observable` of the response, with the response body as a `Blob`.
|
2630 | */
|
2631 | put(url: string, body: any | null, options: {
|
2632 | headers?: HttpHeaders | {
|
2633 | [header: string]: string | string[];
|
2634 | };
|
2635 | context?: HttpContext;
|
2636 | observe?: 'body';
|
2637 | params?: HttpParams | {
|
2638 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2639 | };
|
2640 | reportProgress?: boolean;
|
2641 | responseType: 'blob';
|
2642 | withCredentials?: boolean;
|
2643 | }): Observable<Blob>;
|
2644 | /**
|
2645 | * Constructs a `PUT` request that interprets the body as a text string and
|
2646 | * returns the response as a string value.
|
2647 | *
|
2648 | * @param url The endpoint URL.
|
2649 | * @param body The resources to add/update.
|
2650 | * @param options HTTP options
|
2651 | *
|
2652 | * @return An `Observable` of the response, with a response body of type string.
|
2653 | */
|
2654 | put(url: string, body: any | null, options: {
|
2655 | headers?: HttpHeaders | {
|
2656 | [header: string]: string | string[];
|
2657 | };
|
2658 | context?: HttpContext;
|
2659 | observe?: 'body';
|
2660 | params?: HttpParams | {
|
2661 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2662 | };
|
2663 | reportProgress?: boolean;
|
2664 | responseType: 'text';
|
2665 | withCredentials?: boolean;
|
2666 | }): Observable<string>;
|
2667 | /**
|
2668 | * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and
|
2669 | * returns the full event stream.
|
2670 | *
|
2671 | * @param url The endpoint URL.
|
2672 | * @param body The resources to add/update.
|
2673 | * @param options HTTP options
|
2674 | *
|
2675 | * @return An `Observable` of all `HttpEvent`s for the request,
|
2676 | * with the response body as an `ArrayBuffer`.
|
2677 | */
|
2678 | put(url: string, body: any | null, options: {
|
2679 | headers?: HttpHeaders | {
|
2680 | [header: string]: string | string[];
|
2681 | };
|
2682 | observe: 'events';
|
2683 | context?: HttpContext;
|
2684 | params?: HttpParams | {
|
2685 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2686 | };
|
2687 | reportProgress?: boolean;
|
2688 | responseType: 'arraybuffer';
|
2689 | withCredentials?: boolean;
|
2690 | }): Observable<HttpEvent<ArrayBuffer>>;
|
2691 | /**
|
2692 | * Constructs a `PUT` request that interprets the body as a `Blob` and returns the full event
|
2693 | * stream.
|
2694 | *
|
2695 | * @param url The endpoint URL.
|
2696 | * @param body The resources to add/update.
|
2697 | * @param options HTTP options
|
2698 | *
|
2699 | * @return An `Observable` of all `HttpEvent`s for the request,
|
2700 | * with the response body as a `Blob`.
|
2701 | */
|
2702 | put(url: string, body: any | null, options: {
|
2703 | headers?: HttpHeaders | {
|
2704 | [header: string]: string | string[];
|
2705 | };
|
2706 | observe: 'events';
|
2707 | context?: HttpContext;
|
2708 | params?: HttpParams | {
|
2709 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2710 | };
|
2711 | reportProgress?: boolean;
|
2712 | responseType: 'blob';
|
2713 | withCredentials?: boolean;
|
2714 | }): Observable<HttpEvent<Blob>>;
|
2715 | /**
|
2716 | * Constructs a `PUT` request that interprets the body as a text string and returns the full event
|
2717 | * stream.
|
2718 | *
|
2719 | * @param url The endpoint URL.
|
2720 | * @param body The resources to add/update.
|
2721 | * @param options HTTP options
|
2722 | *
|
2723 | * @return An `Observable` of all `HttpEvent`s for the request, with a response body
|
2724 | * of type string.
|
2725 | */
|
2726 | put(url: string, body: any | null, options: {
|
2727 | headers?: HttpHeaders | {
|
2728 | [header: string]: string | string[];
|
2729 | };
|
2730 | observe: 'events';
|
2731 | context?: HttpContext;
|
2732 | params?: HttpParams | {
|
2733 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2734 | };
|
2735 | reportProgress?: boolean;
|
2736 | responseType: 'text';
|
2737 | withCredentials?: boolean;
|
2738 | }): Observable<HttpEvent<string>>;
|
2739 | /**
|
2740 | * Constructs a `PUT` request that interprets the body as JSON and returns the full
|
2741 | * event stream.
|
2742 | *
|
2743 | * @param url The endpoint URL.
|
2744 | * @param body The resources to add/update.
|
2745 | * @param options HTTP options
|
2746 | *
|
2747 | * @return An `Observable` of all `HttpEvent`s for the request, with a response body of
|
2748 | * type `Object`.
|
2749 | */
|
2750 | put(url: string, body: any | null, options: {
|
2751 | headers?: HttpHeaders | {
|
2752 | [header: string]: string | string[];
|
2753 | };
|
2754 | observe: 'events';
|
2755 | context?: HttpContext;
|
2756 | params?: HttpParams | {
|
2757 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2758 | };
|
2759 | reportProgress?: boolean;
|
2760 | responseType?: 'json';
|
2761 | withCredentials?: boolean;
|
2762 | }): Observable<HttpEvent<Object>>;
|
2763 | /**
|
2764 | * Constructs a `PUT` request that interprets the body as JSON and returns the
|
2765 | * full event stream.
|
2766 | *
|
2767 | * @param url The endpoint URL.
|
2768 | * @param body The resources to add/update.
|
2769 | * @param options HTTP options
|
2770 | *
|
2771 | * @return An `Observable` of all `HttpEvent`s for the request,
|
2772 | * with a response body in the requested type.
|
2773 | */
|
2774 | put<T>(url: string, body: any | null, options: {
|
2775 | headers?: HttpHeaders | {
|
2776 | [header: string]: string | string[];
|
2777 | };
|
2778 | observe: 'events';
|
2779 | context?: HttpContext;
|
2780 | params?: HttpParams | {
|
2781 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2782 | };
|
2783 | reportProgress?: boolean;
|
2784 | responseType?: 'json';
|
2785 | withCredentials?: boolean;
|
2786 | }): Observable<HttpEvent<T>>;
|
2787 | /**
|
2788 | * Constructs a `PUT` request that interprets the body as an
|
2789 | * `ArrayBuffer` and returns an observable of the full HTTP response.
|
2790 | *
|
2791 | * @param url The endpoint URL.
|
2792 | * @param body The resources to add/update.
|
2793 | * @param options HTTP options
|
2794 | *
|
2795 | * @return An `Observable` of the `HttpResponse` for the request, with the response body as an
|
2796 | * `ArrayBuffer`.
|
2797 | */
|
2798 | put(url: string, body: any | null, options: {
|
2799 | headers?: HttpHeaders | {
|
2800 | [header: string]: string | string[];
|
2801 | };
|
2802 | observe: 'response';
|
2803 | context?: HttpContext;
|
2804 | params?: HttpParams | {
|
2805 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2806 | };
|
2807 | reportProgress?: boolean;
|
2808 | responseType: 'arraybuffer';
|
2809 | withCredentials?: boolean;
|
2810 | }): Observable<HttpResponse<ArrayBuffer>>;
|
2811 | /**
|
2812 | * Constructs a `PUT` request that interprets the body as a `Blob` and returns the
|
2813 | * full HTTP response.
|
2814 | *
|
2815 | * @param url The endpoint URL.
|
2816 | * @param body The resources to add/update.
|
2817 | * @param options HTTP options
|
2818 | *
|
2819 | * @return An `Observable` of the `HttpResponse` for the request,
|
2820 | * with the response body as a `Blob`.
|
2821 | */
|
2822 | put(url: string, body: any | null, options: {
|
2823 | headers?: HttpHeaders | {
|
2824 | [header: string]: string | string[];
|
2825 | };
|
2826 | observe: 'response';
|
2827 | context?: HttpContext;
|
2828 | params?: HttpParams | {
|
2829 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2830 | };
|
2831 | reportProgress?: boolean;
|
2832 | responseType: 'blob';
|
2833 | withCredentials?: boolean;
|
2834 | }): Observable<HttpResponse<Blob>>;
|
2835 | /**
|
2836 | * Constructs a `PUT` request that interprets the body as a text stream and returns the
|
2837 | * full HTTP response.
|
2838 | *
|
2839 | * @param url The endpoint URL.
|
2840 | * @param body The resources to add/update.
|
2841 | * @param options HTTP options
|
2842 | *
|
2843 | * @return An `Observable` of the `HttpResponse` for the request, with a response body of type
|
2844 | * string.
|
2845 | */
|
2846 | put(url: string, body: any | null, options: {
|
2847 | headers?: HttpHeaders | {
|
2848 | [header: string]: string | string[];
|
2849 | };
|
2850 | observe: 'response';
|
2851 | context?: HttpContext;
|
2852 | params?: HttpParams | {
|
2853 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2854 | };
|
2855 | reportProgress?: boolean;
|
2856 | responseType: 'text';
|
2857 | withCredentials?: boolean;
|
2858 | }): Observable<HttpResponse<string>>;
|
2859 | /**
|
2860 | * Constructs a `PUT` request that interprets the body as JSON and returns the full
|
2861 | * HTTP response.
|
2862 | *
|
2863 | * @param url The endpoint URL.
|
2864 | * @param body The resources to add/update.
|
2865 | * @param options HTTP options
|
2866 | *
|
2867 | * @return An `Observable` of the `HttpResponse` for the request, with a response body
|
2868 | * of type 'Object`.
|
2869 | */
|
2870 | put(url: string, body: any | null, options: {
|
2871 | headers?: HttpHeaders | {
|
2872 | [header: string]: string | string[];
|
2873 | };
|
2874 | observe: 'response';
|
2875 | context?: HttpContext;
|
2876 | params?: HttpParams | {
|
2877 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2878 | };
|
2879 | reportProgress?: boolean;
|
2880 | responseType?: 'json';
|
2881 | withCredentials?: boolean;
|
2882 | }): Observable<HttpResponse<Object>>;
|
2883 | /**
|
2884 | * Constructs a `PUT` request that interprets the body as an instance of the requested type and
|
2885 | * returns the full HTTP response.
|
2886 | *
|
2887 | * @param url The endpoint URL.
|
2888 | * @param body The resources to add/update.
|
2889 | * @param options HTTP options
|
2890 | *
|
2891 | * @return An `Observable` of the `HttpResponse` for the request,
|
2892 | * with a response body in the requested type.
|
2893 | */
|
2894 | put<T>(url: string, body: any | null, options: {
|
2895 | headers?: HttpHeaders | {
|
2896 | [header: string]: string | string[];
|
2897 | };
|
2898 | observe: 'response';
|
2899 | context?: HttpContext;
|
2900 | params?: HttpParams | {
|
2901 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2902 | };
|
2903 | reportProgress?: boolean;
|
2904 | responseType?: 'json';
|
2905 | withCredentials?: boolean;
|
2906 | }): Observable<HttpResponse<T>>;
|
2907 | /**
|
2908 | * Constructs a `PUT` request that interprets the body as JSON
|
2909 | * and returns an observable of JavaScript object.
|
2910 | *
|
2911 | * @param url The endpoint URL.
|
2912 | * @param body The resources to add/update.
|
2913 | * @param options HTTP options
|
2914 | *
|
2915 | * @return An `Observable` of the response as a JavaScript object.
|
2916 | */
|
2917 | put(url: string, body: any | null, options?: {
|
2918 | headers?: HttpHeaders | {
|
2919 | [header: string]: string | string[];
|
2920 | };
|
2921 | context?: HttpContext;
|
2922 | observe?: 'body';
|
2923 | params?: HttpParams | {
|
2924 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2925 | };
|
2926 | reportProgress?: boolean;
|
2927 | responseType?: 'json';
|
2928 | withCredentials?: boolean;
|
2929 | }): Observable<Object>;
|
2930 | /**
|
2931 | * Constructs a `PUT` request that interprets the body as an instance of the requested type
|
2932 | * and returns an observable of the requested type.
|
2933 | *
|
2934 | * @param url The endpoint URL.
|
2935 | * @param body The resources to add/update.
|
2936 | * @param options HTTP options
|
2937 | *
|
2938 | * @return An `Observable` of the requested type.
|
2939 | */
|
2940 | put<T>(url: string, body: any | null, options?: {
|
2941 | headers?: HttpHeaders | {
|
2942 | [header: string]: string | string[];
|
2943 | };
|
2944 | context?: HttpContext;
|
2945 | observe?: 'body';
|
2946 | params?: HttpParams | {
|
2947 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
2948 | };
|
2949 | reportProgress?: boolean;
|
2950 | responseType?: 'json';
|
2951 | withCredentials?: boolean;
|
2952 | }): Observable<T>;
|
2953 | static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient, never>;
|
2954 | static ɵprov: i0.ɵɵInjectableDeclaration<HttpClient>;
|
2955 | }
|
2956 |
|
2957 | /**
|
2958 | * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`
|
2959 | * with supporting services for JSONP.
|
2960 | * Without this module, Jsonp requests reach the backend
|
2961 | * with method JSONP, where they are rejected.
|
2962 | *
|
2963 | * @publicApi
|
2964 | */
|
2965 | export declare class HttpClientJsonpModule {
|
2966 | static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientJsonpModule, never>;
|
2967 | static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientJsonpModule, never, never, never>;
|
2968 | static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientJsonpModule>;
|
2969 | }
|
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 |
|
2975 |
|
2976 |
|
2977 |
|
2978 |
|
2979 |
|
2980 | export declare class HttpClientModule {
|
2981 | static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientModule, never>;
|
2982 | static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientModule, never, never, never>;
|
2983 | static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientModule>;
|
2984 | }
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 |
|
2996 |
|
2997 |
|
2998 | export declare class HttpClientXsrfModule {
|
2999 | |
3000 |
|
3001 |
|
3002 | static disable(): ModuleWithProviders<HttpClientXsrfModule>;
|
3003 | |
3004 |
|
3005 |
|
3006 |
|
3007 |
|
3008 |
|
3009 |
|
3010 |
|
3011 | static withOptions(options?: {
|
3012 | cookieName?: string;
|
3013 | headerName?: string;
|
3014 | }): ModuleWithProviders<HttpClientXsrfModule>;
|
3015 | static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientXsrfModule, never>;
|
3016 | static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientXsrfModule, never, never, never>;
|
3017 | static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientXsrfModule>;
|
3018 | }
|
3019 |
|
3020 |
|
3021 |
|
3022 |
|
3023 |
|
3024 |
|
3025 |
|
3026 |
|
3027 |
|
3028 |
|
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 |
|
3034 |
|
3035 |
|
3036 |
|
3037 |
|
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 |
|
3043 |
|
3044 |
|
3045 |
|
3046 |
|
3047 |
|
3048 |
|
3049 |
|
3050 |
|
3051 |
|
3052 |
|
3053 | export declare class HttpContext {
|
3054 | private readonly map;
|
3055 | |
3056 |
|
3057 |
|
3058 |
|
3059 |
|
3060 |
|
3061 |
|
3062 |
|
3063 | set<T>(token: HttpContextToken<T>, value: T): HttpContext;
|
3064 | |
3065 |
|
3066 |
|
3067 |
|
3068 |
|
3069 |
|
3070 |
|
3071 | get<T>(token: HttpContextToken<T>): T;
|
3072 | |
3073 |
|
3074 |
|
3075 |
|
3076 |
|
3077 |
|
3078 |
|
3079 | delete(token: HttpContextToken<unknown>): HttpContext;
|
3080 | |
3081 |
|
3082 |
|
3083 |
|
3084 |
|
3085 |
|
3086 |
|
3087 | has(token: HttpContextToken<unknown>): boolean;
|
3088 | |
3089 |
|
3090 |
|
3091 | keys(): IterableIterator<HttpContextToken<unknown>>;
|
3092 | }
|
3093 |
|
3094 |
|
3095 |
|
3096 |
|
3097 |
|
3098 |
|
3099 |
|
3100 | export declare class HttpContextToken<T> {
|
3101 | readonly defaultValue: () => T;
|
3102 | constructor(defaultValue: () => T);
|
3103 | }
|
3104 |
|
3105 | /**
|
3106 | * A download progress event.
|
3107 | *
|
3108 | * @publicApi
|
3109 | */
|
3110 | export declare interface HttpDownloadProgressEvent extends HttpProgressEvent {
|
3111 | type: HttpEventType.DownloadProgress;
|
3112 | |
3113 |
|
3114 |
|
3115 |
|
3116 |
|
3117 | partialText?: string;
|
3118 | }
|
3119 |
|
3120 |
|
3121 |
|
3122 |
|
3123 |
|
3124 |
|
3125 |
|
3126 |
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 |
|
3132 |
|
3133 | export declare class HttpErrorResponse extends HttpResponseBase implements Error {
|
3134 | readonly name = "HttpErrorResponse";
|
3135 | readonly message: string;
|
3136 | readonly error: any | null;
|
3137 | |
3138 |
|
3139 |
|
3140 | readonly ok = false;
|
3141 | constructor(init: {
|
3142 | error?: any;
|
3143 | headers?: HttpHeaders;
|
3144 | status?: number;
|
3145 | statusText?: string;
|
3146 | url?: string;
|
3147 | });
|
3148 | }
|
3149 |
|
3150 | /**
|
3151 | * Union type for all possible events on the response stream.
|
3152 | *
|
3153 | * Typed according to the expected type of the response.
|
3154 | *
|
3155 | * @publicApi
|
3156 | */
|
3157 | export declare type HttpEvent<T> = HttpSentEvent | HttpHeaderResponse | HttpResponse<T> | HttpProgressEvent | HttpUserEvent<T>;
|
3158 |
|
3159 | /**
|
3160 | * Type enumeration for the different kinds of `HttpEvent`.
|
3161 | *
|
3162 | * @publicApi
|
3163 | */
|
3164 | export declare enum HttpEventType {
|
3165 | |
3166 |
|
3167 |
|
3168 | Sent = 0,
|
3169 | |
3170 |
|
3171 |
|
3172 | UploadProgress = 1,
|
3173 | |
3174 |
|
3175 |
|
3176 | ResponseHeader = 2,
|
3177 | |
3178 |
|
3179 |
|
3180 | DownloadProgress = 3,
|
3181 | |
3182 |
|
3183 |
|
3184 | Response = 4,
|
3185 | |
3186 |
|
3187 |
|
3188 | User = 5
|
3189 | }
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 | export declare interface HttpFeature<KindT extends HttpFeatureKind> {
|
3197 | ɵkind: KindT;
|
3198 | ɵproviders: Provider[];
|
3199 | }
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 | export declare enum HttpFeatureKind {
|
3207 | Interceptors = 0,
|
3208 | LegacyInterceptors = 1,
|
3209 | CustomXsrfConfiguration = 2,
|
3210 | NoXsrfProtection = 3,
|
3211 | JsonpSupport = 4,
|
3212 | RequestsMadeViaParent = 5
|
3213 | }
|
3214 |
|
3215 |
|
3216 |
|
3217 |
|
3218 |
|
3219 |
|
3220 |
|
3221 |
|
3222 |
|
3223 |
|
3224 |
|
3225 |
|
3226 |
|
3227 | export declare abstract class HttpHandler {
|
3228 | abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
|
3229 | }
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 |
|
3242 |
|
3243 |
|
3244 |
|
3245 |
|
3246 |
|
3247 |
|
3248 |
|
3249 |
|
3250 | export declare type HttpHandlerFn = (req: HttpRequest<unknown>) => Observable<HttpEvent<unknown>>;
|
3251 |
|
3252 |
|
3253 |
|
3254 |
|
3255 |
|
3256 |
|
3257 |
|
3258 |
|
3259 |
|
3260 |
|
3261 | export declare class HttpHeaderResponse extends HttpResponseBase {
|
3262 | |
3263 |
|
3264 |
|
3265 | constructor(init?: {
|
3266 | headers?: HttpHeaders;
|
3267 | status?: number;
|
3268 | statusText?: string;
|
3269 | url?: string;
|
3270 | });
|
3271 | readonly type: HttpEventType.ResponseHeader;
|
3272 | /**
|
3273 | * Copy this `HttpHeaderResponse`, overriding its contents with the
|
3274 | * given parameter hash.
|
3275 | */
|
3276 | clone(update?: {
|
3277 | headers?: HttpHeaders;
|
3278 | status?: number;
|
3279 | statusText?: string;
|
3280 | url?: string;
|
3281 | }): HttpHeaderResponse;
|
3282 | }
|
3283 |
|
3284 |
|
3285 | /**
|
3286 | * Represents the header configuration options for an HTTP request.
|
3287 | * Instances are immutable. Modifying methods return a cloned
|
3288 | * instance with the change. The original object is never changed.
|
3289 | *
|
3290 | * @publicApi
|
3291 | */
|
3292 | export declare class HttpHeaders {
|
3293 | |
3294 |
|
3295 |
|
3296 | private headers;
|
3297 | |
3298 |
|
3299 |
|
3300 |
|
3301 | private normalizedNames;
|
3302 | |
3303 |
|
3304 |
|
3305 | private lazyInit;
|
3306 | |
3307 |
|
3308 |
|
3309 | private lazyUpdate;
|
3310 |
|
3311 | constructor(headers?: string | {
|
3312 | [name: string]: string | string[];
|
3313 | });
|
3314 | /**
|
3315 | * Checks for existence of a given header.
|
3316 | *
|
3317 | * @param name The header name to check for existence.
|
3318 | *
|
3319 | * @returns True if the header exists, false otherwise.
|
3320 | */
|
3321 | has(name: string): boolean;
|
3322 | /**
|
3323 | * Retrieves the first value of a given header.
|
3324 | *
|
3325 | * @param name The header name.
|
3326 | *
|
3327 | * @returns The value string if the header exists, null otherwise
|
3328 | */
|
3329 | get(name: string): string | null;
|
3330 | /**
|
3331 | * Retrieves the names of the headers.
|
3332 | *
|
3333 | * @returns A list of header names.
|
3334 | */
|
3335 | keys(): string[];
|
3336 | /**
|
3337 | * Retrieves a list of values for a given header.
|
3338 | *
|
3339 | * @param name The header name from which to retrieve values.
|
3340 | *
|
3341 | * @returns A string of values if the header exists, null otherwise.
|
3342 | */
|
3343 | getAll(name: string): string[] | null;
|
3344 | /**
|
3345 | * Appends a new value to the existing set of values for a header
|
3346 | * and returns them in a clone of the original instance.
|
3347 | *
|
3348 | * @param name The header name for which to append the values.
|
3349 | * @param value The value to append.
|
3350 | *
|
3351 | * @returns A clone of the HTTP headers object with the value appended to the given header.
|
3352 | */
|
3353 | append(name: string, value: string | string[]): HttpHeaders;
|
3354 | /**
|
3355 | * Sets or modifies a value for a given header in a clone of the original instance.
|
3356 | * If the header already exists, its value is replaced with the given value
|
3357 | * in the returned object.
|
3358 | *
|
3359 | * @param name The header name.
|
3360 | * @param value The value or values to set or override for the given header.
|
3361 | *
|
3362 | * @returns A clone of the HTTP headers object with the newly set header value.
|
3363 | */
|
3364 | set(name: string, value: string | string[]): HttpHeaders;
|
3365 | /**
|
3366 | * Deletes values for a given header in a clone of the original instance.
|
3367 | *
|
3368 | * @param name The header name.
|
3369 | * @param value The value or values to delete for the given header.
|
3370 | *
|
3371 | * @returns A clone of the HTTP headers object with the given value deleted.
|
3372 | */
|
3373 | delete(name: string, value?: string | string[]): HttpHeaders;
|
3374 | private maybeSetNormalizedName;
|
3375 | private init;
|
3376 | private copyFrom;
|
3377 | private clone;
|
3378 | private applyUpdate;
|
3379 | }
|
3380 |
|
3381 | /**
|
3382 | * Intercepts and handles an `HttpRequest` or `HttpResponse`.
|
3383 | *
|
3384 | * Most interceptors transform the outgoing request before passing it to the
|
3385 | * next interceptor in the chain, by calling `next.handle(transformedReq)`.
|
3386 | * An interceptor may transform the
|
3387 | * response event stream as well, by applying additional RxJS operators on the stream
|
3388 | * returned by `next.handle()`.
|
3389 | *
|
3390 | * More rarely, an interceptor may handle the request entirely,
|
3391 | * and compose a new event stream instead of invoking `next.handle()`. This is an
|
3392 | * acceptable behavior, but keep in mind that further interceptors will be skipped entirely.
|
3393 | *
|
3394 | * It is also rare but valid for an interceptor to return multiple responses on the
|
3395 | * event stream for a single request.
|
3396 | *
|
3397 | * @publicApi
|
3398 | *
|
3399 | * @see [HTTP Guide](guide/http#intercepting-requests-and-responses)
|
3400 | *
|
3401 | * @usageNotes
|
3402 | *
|
3403 | * To use the same instance of `HttpInterceptors` for the entire app, import the `HttpClientModule`
|
3404 | * only in your `AppModule`, and add the interceptors to the root application injector.
|
3405 | * If you import `HttpClientModule` multiple times across different modules (for example, in lazy
|
3406 | * loading modules), each import creates a new copy of the `HttpClientModule`, which overwrites the
|
3407 | * interceptors provided in the root module.
|
3408 | */
|
3409 | export declare interface HttpInterceptor {
|
3410 | |
3411 |
|
3412 |
|
3413 |
|
3414 |
|
3415 |
|
3416 |
|
3417 | intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
3418 | }
|
3419 |
|
3420 |
|
3421 |
|
3422 |
|
3423 |
|
3424 |
|
3425 |
|
3426 |
|
3427 |
|
3428 |
|
3429 |
|
3430 |
|
3431 |
|
3432 |
|
3433 |
|
3434 | export declare type HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => Observable<HttpEvent<unknown>>;
|
3435 |
|
3436 | declare class HttpInterceptorHandler extends HttpHandler {
|
3437 | private backend;
|
3438 | private injector;
|
3439 | private chain;
|
3440 | constructor(backend: HttpBackend, injector: EnvironmentInjector);
|
3441 | handle(initialRequest: HttpRequest<any>): Observable<HttpEvent<any>>;
|
3442 | static ɵfac: i0.ɵɵFactoryDeclaration<HttpInterceptorHandler, never>;
|
3443 | static ɵprov: i0.ɵɵInjectableDeclaration<HttpInterceptorHandler>;
|
3444 | }
|
3445 | export { HttpInterceptorHandler as ɵHttpInterceptingHandler }
|
3446 | export { HttpInterceptorHandler as ɵHttpInterceptorHandler }
|
3447 |
|
3448 |
|
3449 |
|
3450 |
|
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 |
|
3456 | export declare interface HttpParameterCodec {
|
3457 | encodeKey(key: string): string;
|
3458 | encodeValue(value: string): string;
|
3459 | decodeKey(key: string): string;
|
3460 | decodeValue(value: string): string;
|
3461 | }
|
3462 |
|
3463 |
|
3464 |
|
3465 |
|
3466 |
|
3467 |
|
3468 |
|
3469 |
|
3470 |
|
3471 | export declare class HttpParams {
|
3472 | private map;
|
3473 | private encoder;
|
3474 | private updates;
|
3475 | private cloneFrom;
|
3476 | constructor(options?: HttpParamsOptions);
|
3477 | /**
|
3478 | * Reports whether the body includes one or more values for a given parameter.
|
3479 | * @param param The parameter name.
|
3480 | * @returns True if the parameter has one or more values,
|
3481 | * false if it has no value or is not present.
|
3482 | */
|
3483 | has(param: string): boolean;
|
3484 | /**
|
3485 | * Retrieves the first value for a parameter.
|
3486 | * @param param The parameter name.
|
3487 | * @returns The first value of the given parameter,
|
3488 | * or `null` if the parameter is not present.
|
3489 | */
|
3490 | get(param: string): string | null;
|
3491 | /**
|
3492 | * Retrieves all values for a parameter.
|
3493 | * @param param The parameter name.
|
3494 | * @returns All values in a string array,
|
3495 | * or `null` if the parameter not present.
|
3496 | */
|
3497 | getAll(param: string): string[] | null;
|
3498 | /**
|
3499 | * Retrieves all the parameters for this body.
|
3500 | * @returns The parameter names in a string array.
|
3501 | */
|
3502 | keys(): string[];
|
3503 | /**
|
3504 | * Appends a new value to existing values for a parameter.
|
3505 | * @param param The parameter name.
|
3506 | * @param value The new value to add.
|
3507 | * @return A new body with the appended value.
|
3508 | */
|
3509 | append(param: string, value: string | number | boolean): HttpParams;
|
3510 | /**
|
3511 | * Constructs a new body with appended values for the given parameter name.
|
3512 | * @param params parameters and values
|
3513 | * @return A new body with the new value.
|
3514 | */
|
3515 | appendAll(params: {
|
3516 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
3517 | }): HttpParams;
|
3518 | /**
|
3519 | * Replaces the value for a parameter.
|
3520 | * @param param The parameter name.
|
3521 | * @param value The new value.
|
3522 | * @return A new body with the new value.
|
3523 | */
|
3524 | set(param: string, value: string | number | boolean): HttpParams;
|
3525 | /**
|
3526 | * Removes a given value or all values from a parameter.
|
3527 | * @param param The parameter name.
|
3528 | * @param value The value to remove, if provided.
|
3529 | * @return A new body with the given value removed, or with all values
|
3530 | * removed if no value is specified.
|
3531 | */
|
3532 | delete(param: string, value?: string | number | boolean): HttpParams;
|
3533 | /**
|
3534 | * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are
|
3535 | * separated by `&`s.
|
3536 | */
|
3537 | toString(): string;
|
3538 | private clone;
|
3539 | private init;
|
3540 | }
|
3541 |
|
3542 | /**
|
3543 | * Options used to construct an `HttpParams` instance.
|
3544 | *
|
3545 | * @publicApi
|
3546 | */
|
3547 | export declare interface HttpParamsOptions {
|
3548 | |
3549 |
|
3550 |
|
3551 |
|
3552 | fromString?: string;
|
3553 |
|
3554 | fromObject?: {
|
3555 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
3556 | };
|
3557 |
|
3558 | encoder?: HttpParameterCodec;
|
3559 | }
|
3560 |
|
3561 |
|
3562 |
|
3563 |
|
3564 |
|
3565 |
|
3566 | export declare interface HttpProgressEvent {
|
3567 | |
3568 |
|
3569 |
|
3570 | type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress;
|
3571 | |
3572 |
|
3573 |
|
3574 | loaded: number;
|
3575 | |
3576 |
|
3577 |
|
3578 |
|
3579 | total?: number;
|
3580 | }
|
3581 |
|
3582 |
|
3583 |
|
3584 |
|
3585 |
|
3586 |
|
3587 |
|
3588 |
|
3589 |
|
3590 |
|
3591 |
|
3592 | export declare class HttpRequest<T> {
|
3593 | readonly url: string;
|
3594 | |
3595 |
|
3596 |
|
3597 |
|
3598 |
|
3599 |
|
3600 |
|
3601 | readonly body: T | null;
|
3602 | |
3603 |
|
3604 |
|
3605 | readonly headers: HttpHeaders;
|
3606 | |
3607 |
|
3608 |
|
3609 | readonly context: HttpContext;
|
3610 | |
3611 |
|
3612 |
|
3613 |
|
3614 |
|
3615 |
|
3616 | readonly reportProgress: boolean;
|
3617 | |
3618 |
|
3619 |
|
3620 | readonly withCredentials: boolean;
|
3621 | |
3622 |
|
3623 |
|
3624 |
|
3625 |
|
3626 |
|
3627 | readonly responseType: 'arraybuffer' | 'blob' | 'json' | 'text';
|
3628 | |
3629 |
|
3630 |
|
3631 | readonly method: string;
|
3632 | |
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 |
|
3638 |
|
3639 |
|
3640 |
|
3641 |
|
3642 | readonly params: HttpParams;
|
3643 | |
3644 |
|
3645 |
|
3646 | readonly urlWithParams: string;
|
3647 | constructor(method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS', url: string, init?: {
|
3648 | headers?: HttpHeaders;
|
3649 | context?: HttpContext;
|
3650 | reportProgress?: boolean;
|
3651 | params?: HttpParams;
|
3652 | responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
3653 | withCredentials?: boolean;
|
3654 | });
|
3655 | constructor(method: 'POST' | 'PUT' | 'PATCH', url: string, body: T | null, init?: {
|
3656 | headers?: HttpHeaders;
|
3657 | context?: HttpContext;
|
3658 | reportProgress?: boolean;
|
3659 | params?: HttpParams;
|
3660 | responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
3661 | withCredentials?: boolean;
|
3662 | });
|
3663 | constructor(method: string, url: string, body: T | null, init?: {
|
3664 | headers?: HttpHeaders;
|
3665 | context?: HttpContext;
|
3666 | reportProgress?: boolean;
|
3667 | params?: HttpParams;
|
3668 | responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
3669 | withCredentials?: boolean;
|
3670 | });
|
3671 | /**
|
3672 | * Transform the free-form body into a serialized format suitable for
|
3673 | * transmission to the server.
|
3674 | */
|
3675 | serializeBody(): ArrayBuffer | Blob | FormData | string | null;
|
3676 | /**
|
3677 | * Examine the body and attempt to infer an appropriate MIME type
|
3678 | * for it.
|
3679 | *
|
3680 | * If no such type can be inferred, this method will return `null`.
|
3681 | */
|
3682 | detectContentTypeHeader(): string | null;
|
3683 | clone(): HttpRequest<T>;
|
3684 | clone(update: {
|
3685 | headers?: HttpHeaders;
|
3686 | context?: HttpContext;
|
3687 | reportProgress?: boolean;
|
3688 | params?: HttpParams;
|
3689 | responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
3690 | withCredentials?: boolean;
|
3691 | body?: T | null;
|
3692 | method?: string;
|
3693 | url?: string;
|
3694 | setHeaders?: {
|
3695 | [name: string]: string | string[];
|
3696 | };
|
3697 | setParams?: {
|
3698 | [param: string]: string;
|
3699 | };
|
3700 | }): HttpRequest<T>;
|
3701 | clone<V>(update: {
|
3702 | headers?: HttpHeaders;
|
3703 | context?: HttpContext;
|
3704 | reportProgress?: boolean;
|
3705 | params?: HttpParams;
|
3706 | responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
3707 | withCredentials?: boolean;
|
3708 | body?: V | null;
|
3709 | method?: string;
|
3710 | url?: string;
|
3711 | setHeaders?: {
|
3712 | [name: string]: string | string[];
|
3713 | };
|
3714 | setParams?: {
|
3715 | [param: string]: string;
|
3716 | };
|
3717 | }): HttpRequest<V>;
|
3718 | }
|
3719 |
|
3720 | /**
|
3721 | * A full HTTP response, including a typed response body (which may be `null`
|
3722 | * if one was not returned).
|
3723 | *
|
3724 | * `HttpResponse` is a `HttpEvent` available on the response event
|
3725 | * stream.
|
3726 | *
|
3727 | * @publicApi
|
3728 | */
|
3729 | export declare class HttpResponse<T> extends HttpResponseBase {
|
3730 | /**
|
3731 | * The response body, or `null` if one was not returned.
|
3732 | */
|
3733 | readonly body: T | null;
|
3734 | /**
|
3735 | * Construct a new `HttpResponse`.
|
3736 | */
|
3737 | constructor(init?: {
|
3738 | body?: T | null;
|
3739 | headers?: HttpHeaders;
|
3740 | status?: number;
|
3741 | statusText?: string;
|
3742 | url?: string;
|
3743 | });
|
3744 | readonly type: HttpEventType.Response;
|
3745 | clone(): HttpResponse<T>;
|
3746 | clone(update: {
|
3747 | headers?: HttpHeaders;
|
3748 | status?: number;
|
3749 | statusText?: string;
|
3750 | url?: string;
|
3751 | }): HttpResponse<T>;
|
3752 | clone<V>(update: {
|
3753 | body?: V | null;
|
3754 | headers?: HttpHeaders;
|
3755 | status?: number;
|
3756 | statusText?: string;
|
3757 | url?: string;
|
3758 | }): HttpResponse<V>;
|
3759 | }
|
3760 |
|
3761 | /**
|
3762 | * Base class for both `HttpResponse` and `HttpHeaderResponse`.
|
3763 | *
|
3764 | * @publicApi
|
3765 | */
|
3766 | export declare abstract class HttpResponseBase {
|
3767 | /**
|
3768 | * All response headers.
|
3769 | */
|
3770 | readonly headers: HttpHeaders;
|
3771 | /**
|
3772 | * Response status code.
|
3773 | */
|
3774 | readonly status: number;
|
3775 | /**
|
3776 | * Textual description of response status code, defaults to OK.
|
3777 | *
|
3778 | * Do not depend on this.
|
3779 | */
|
3780 | readonly statusText: string;
|
3781 | /**
|
3782 | * URL of the resource retrieved, or null if not available.
|
3783 | */
|
3784 | readonly url: string | null;
|
3785 | /**
|
3786 | * Whether the status code falls in the 2xx range.
|
3787 | */
|
3788 | readonly ok: boolean;
|
3789 | /**
|
3790 | * Type of the response, narrowed to either the full response or the header.
|
3791 | */
|
3792 | readonly type: HttpEventType.Response | HttpEventType.ResponseHeader;
|
3793 | /**
|
3794 | * Super-constructor for all responses.
|
3795 | *
|
3796 | * The single parameter accepted is an initialization hash. Any properties
|
3797 | * of the response passed there will override the default values.
|
3798 | */
|
3799 | constructor(init: {
|
3800 | headers?: HttpHeaders;
|
3801 | status?: number;
|
3802 | statusText?: string;
|
3803 | url?: string;
|
3804 | }, defaultStatus?: number, defaultStatusText?: string);
|
3805 | }
|
3806 |
|
3807 | /**
|
3808 | * An event indicating that the request was sent to the server. Useful
|
3809 | * when a request may be retried multiple times, to distinguish between
|
3810 | * retries on the final event stream.
|
3811 | *
|
3812 | * @publicApi
|
3813 | */
|
3814 | export declare interface HttpSentEvent {
|
3815 | type: HttpEventType.Sent;
|
3816 | }
|
3817 |
|
3818 | /**
|
3819 | * Http status codes.
|
3820 | * As per https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
3821 | * @publicApi
|
3822 | */
|
3823 | export declare const enum HttpStatusCode {
|
3824 | Continue = 100,
|
3825 | SwitchingProtocols = 101,
|
3826 | Processing = 102,
|
3827 | EarlyHints = 103,
|
3828 | Ok = 200,
|
3829 | Created = 201,
|
3830 | Accepted = 202,
|
3831 | NonAuthoritativeInformation = 203,
|
3832 | NoContent = 204,
|
3833 | ResetContent = 205,
|
3834 | PartialContent = 206,
|
3835 | MultiStatus = 207,
|
3836 | AlreadyReported = 208,
|
3837 | ImUsed = 226,
|
3838 | MultipleChoices = 300,
|
3839 | MovedPermanently = 301,
|
3840 | Found = 302,
|
3841 | SeeOther = 303,
|
3842 | NotModified = 304,
|
3843 | UseProxy = 305,
|
3844 | Unused = 306,
|
3845 | TemporaryRedirect = 307,
|
3846 | PermanentRedirect = 308,
|
3847 | BadRequest = 400,
|
3848 | Unauthorized = 401,
|
3849 | PaymentRequired = 402,
|
3850 | Forbidden = 403,
|
3851 | NotFound = 404,
|
3852 | MethodNotAllowed = 405,
|
3853 | NotAcceptable = 406,
|
3854 | ProxyAuthenticationRequired = 407,
|
3855 | RequestTimeout = 408,
|
3856 | Conflict = 409,
|
3857 | Gone = 410,
|
3858 | LengthRequired = 411,
|
3859 | PreconditionFailed = 412,
|
3860 | PayloadTooLarge = 413,
|
3861 | UriTooLong = 414,
|
3862 | UnsupportedMediaType = 415,
|
3863 | RangeNotSatisfiable = 416,
|
3864 | ExpectationFailed = 417,
|
3865 | ImATeapot = 418,
|
3866 | MisdirectedRequest = 421,
|
3867 | UnprocessableEntity = 422,
|
3868 | Locked = 423,
|
3869 | FailedDependency = 424,
|
3870 | TooEarly = 425,
|
3871 | UpgradeRequired = 426,
|
3872 | PreconditionRequired = 428,
|
3873 | TooManyRequests = 429,
|
3874 | RequestHeaderFieldsTooLarge = 431,
|
3875 | UnavailableForLegalReasons = 451,
|
3876 | InternalServerError = 500,
|
3877 | NotImplemented = 501,
|
3878 | BadGateway = 502,
|
3879 | ServiceUnavailable = 503,
|
3880 | GatewayTimeout = 504,
|
3881 | HttpVersionNotSupported = 505,
|
3882 | VariantAlsoNegotiates = 506,
|
3883 | InsufficientStorage = 507,
|
3884 | LoopDetected = 508,
|
3885 | NotExtended = 510,
|
3886 | NetworkAuthenticationRequired = 511
|
3887 | }
|
3888 |
|
3889 | /**
|
3890 | * An upload progress event.
|
3891 | *
|
3892 | * @publicApi
|
3893 | */
|
3894 | export declare interface HttpUploadProgressEvent extends HttpProgressEvent {
|
3895 | type: HttpEventType.UploadProgress;
|
3896 | }
|
3897 |
|
3898 | /**
|
3899 | * Provides encoding and decoding of URL parameter and query-string values.
|
3900 | *
|
3901 | * Serializes and parses URL parameter keys and values to encode and decode them.
|
3902 | * If you pass URL query parameters without encoding,
|
3903 | * the query parameters can be misinterpreted at the receiving end.
|
3904 | *
|
3905 | *
|
3906 | * @publicApi
|
3907 | */
|
3908 | export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
|
3909 | |
3910 |
|
3911 |
|
3912 |
|
3913 |
|
3914 | encodeKey(key: string): string;
|
3915 | |
3916 |
|
3917 |
|
3918 |
|
3919 |
|
3920 | encodeValue(value: string): string;
|
3921 | |
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 | decodeKey(key: string): string;
|
3927 | |
3928 |
|
3929 |
|
3930 |
|
3931 |
|
3932 | decodeValue(value: string): string;
|
3933 | }
|
3934 |
|
3935 |
|
3936 |
|
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 |
|
3942 |
|
3943 | export declare interface HttpUserEvent<T> {
|
3944 | type: HttpEventType.User;
|
3945 | }
|
3946 |
|
3947 |
|
3948 |
|
3949 |
|
3950 |
|
3951 |
|
3952 |
|
3953 |
|
3954 | export declare class HttpXhrBackend implements HttpBackend {
|
3955 | private xhrFactory;
|
3956 | constructor(xhrFactory: XhrFactory_2);
|
3957 | /**
|
3958 | * Processes a request and returns a stream of response events.
|
3959 | * @param req The request object.
|
3960 | * @returns An observable of the response events.
|
3961 | */
|
3962 | handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
|
3963 | static ɵfac: i0.ɵɵFactoryDeclaration<HttpXhrBackend, never>;
|
3964 | static ɵprov: i0.ɵɵInjectableDeclaration<HttpXhrBackend>;
|
3965 | }
|
3966 |
|
3967 | /**
|
3968 | * Retrieves the current XSRF token to use with the next outgoing request.
|
3969 | *
|
3970 | * @publicApi
|
3971 | */
|
3972 | export declare abstract class HttpXsrfTokenExtractor {
|
3973 | |
3974 |
|
3975 |
|
3976 |
|
3977 |
|
3978 | abstract getToken(): string | null;
|
3979 | }
|
3980 |
|
3981 |
|
3982 |
|
3983 |
|
3984 |
|
3985 |
|
3986 |
|
3987 |
|
3988 | declare abstract class JsonpCallbackContext {
|
3989 | [key: string]: (data: any) => void;
|
3990 | }
|
3991 |
|
3992 |
|
3993 |
|
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 | export declare class JsonpClientBackend implements HttpBackend {
|
4001 | private callbackMap;
|
4002 | private document;
|
4003 | |
4004 |
|
4005 |
|
4006 | private readonly resolvedPromise;
|
4007 | constructor(callbackMap: JsonpCallbackContext, document: any);
|
4008 | /**
|
4009 | * Get the name of the next callback method, by incrementing the global `nextRequestId`.
|
4010 | */
|
4011 | private nextCallback;
|
4012 | /**
|
4013 | * Processes a JSONP request and returns an event stream of the results.
|
4014 | * @param req The request object.
|
4015 | * @returns An observable of the response events.
|
4016 | *
|
4017 | */
|
4018 | handle(req: HttpRequest<never>): Observable<HttpEvent<any>>;
|
4019 | private removeListeners;
|
4020 | static ɵfac: i0.ɵɵFactoryDeclaration<JsonpClientBackend, never>;
|
4021 | static ɵprov: i0.ɵɵInjectableDeclaration<JsonpClientBackend>;
|
4022 | }
|
4023 |
|
4024 | /**
|
4025 | * Identifies requests with the method JSONP and
|
4026 | * shifts them to the `JsonpClientBackend`.
|
4027 | *
|
4028 | * @see `HttpInterceptor`
|
4029 | *
|
4030 | * @publicApi
|
4031 | */
|
4032 | export declare class JsonpInterceptor {
|
4033 | private injector;
|
4034 | constructor(injector: EnvironmentInjector);
|
4035 | /**
|
4036 | * Identifies and handles a given JSONP request.
|
4037 | * @param initialRequest The outgoing request object to handle.
|
4038 | * @param next The next interceptor in the chain, or the backend
|
4039 | * if no interceptors remain in the chain.
|
4040 | * @returns An observable of the event stream.
|
4041 | */
|
4042 | intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
4043 | static ɵfac: i0.ɵɵFactoryDeclaration<JsonpInterceptor, never>;
|
4044 | static ɵprov: i0.ɵɵInjectableDeclaration<JsonpInterceptor>;
|
4045 | }
|
4046 |
|
4047 | /**
|
4048 | * Configures Angular's `HttpClient` service to be available for injection.
|
4049 | *
|
4050 | * By default, `HttpClient` will be configured for injection with its default options for XSRF
|
4051 | * protection of outgoing requests. Additional configuration options can be provided by passing
|
4052 | * feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the
|
4053 | * `withInterceptors(...)` feature.
|
4054 | *
|
4055 | * @see withInterceptors
|
4056 | * @see withInterceptorsFromDi
|
4057 | * @see withXsrfConfiguration
|
4058 | * @see withNoXsrfProtection
|
4059 | * @see withJsonpSupport
|
4060 | * @see withRequestsMadeViaParent
|
4061 | */
|
4062 | export declare function provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders;
|
4063 |
|
4064 | /**
|
4065 | * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`
|
4066 | * instance.
|
4067 | *
|
4068 | * @see HttpInterceptorFn
|
4069 | * @see provideHttpClient
|
4070 | * @publicApi
|
4071 | */
|
4072 | export declare function withInterceptors(interceptorFns: HttpInterceptorFn[]): HttpFeature<HttpFeatureKind.Interceptors>;
|
4073 |
|
4074 | /**
|
4075 | * Includes class-based interceptors configured using a multi-provider in the current injector into
|
4076 | * the configured `HttpClient` instance.
|
4077 | *
|
4078 | * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided
|
4079 | * interceptors may be phased out in a later release.
|
4080 | *
|
4081 | * @see HttpInterceptor
|
4082 | * @see HTTP_INTERCEPTORS
|
4083 | * @see provideHttpClient
|
4084 | */
|
4085 | export declare function withInterceptorsFromDi(): HttpFeature<HttpFeatureKind.LegacyInterceptors>;
|
4086 |
|
4087 | /**
|
4088 | * Add JSONP support to the configuration of the current `HttpClient` instance.
|
4089 | *
|
4090 | * @see provideHttpClient
|
4091 | */
|
4092 | export declare function withJsonpSupport(): HttpFeature<HttpFeatureKind.JsonpSupport>;
|
4093 |
|
4094 | /**
|
4095 | * Disables XSRF protection in the configuration of the current `HttpClient` instance.
|
4096 | *
|
4097 | * This feature is incompatible with the `withXsrfConfiguration` feature.
|
4098 | *
|
4099 | * @see provideHttpClient
|
4100 | */
|
4101 | export declare function withNoXsrfProtection(): HttpFeature<HttpFeatureKind.NoXsrfProtection>;
|
4102 |
|
4103 | /**
|
4104 | * Configures the current `HttpClient` instance to make requests via the parent injector's
|
4105 | * `HttpClient` instead of directly.
|
4106 | *
|
4107 | * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent
|
4108 | * instance. For example, even if `HttpClient` is configured in the parent injector with
|
4109 | * one or more interceptors, they will not intercept requests made via this instance.
|
4110 | *
|
4111 | * With this option enabled, once the request has passed through the current injector's
|
4112 | * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of
|
4113 | * dispatched directly, and interceptors in the parent configuration will be applied to the request.
|
4114 | *
|
4115 | * If there are several `HttpClient` instances in the injector hierarchy, it's possible for
|
4116 | * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to
|
4117 | * "bubble up" until either reaching the root level or an `HttpClient` which was not configured with
|
4118 | * this option.
|
4119 | *
|
4120 | * @see provideHttpClient
|
4121 | * @developerPreview
|
4122 | */
|
4123 | export declare function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.RequestsMadeViaParent>;
|
4124 |
|
4125 | /**
|
4126 | * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.
|
4127 | *
|
4128 | * This feature is incompatible with the `withNoXsrfProtection` feature.
|
4129 | *
|
4130 | * @see provideHttpClient
|
4131 | */
|
4132 | export declare function withXsrfConfiguration({ cookieName, headerName }: {
|
4133 | cookieName?: string;
|
4134 | headerName?: string;
|
4135 | }): HttpFeature<HttpFeatureKind.CustomXsrfConfiguration>;
|
4136 |
|
4137 | /**
|
4138 | * A wrapper around the `XMLHttpRequest` constructor.
|
4139 | *
|
4140 | * @publicApi
|
4141 | * @see `XhrFactory`
|
4142 | * @deprecated
|
4143 | * `XhrFactory` has moved, please import `XhrFactory` from `@angular/common` instead.
|
4144 | */
|
4145 | export declare type XhrFactory = XhrFactory_2;
|
4146 |
|
4147 | /**
|
4148 | * A wrapper around the `XMLHttpRequest` constructor.
|
4149 | *
|
4150 | * @publicApi
|
4151 | * @see `XhrFactory`
|
4152 | * @deprecated
|
4153 | * `XhrFactory` has moved, please import `XhrFactory` from `@angular/common` instead.
|
4154 | */
|
4155 | export declare const XhrFactory: typeof XhrFactory_2;
|
4156 |
|
4157 | export { }
|