source: trip-planner-front/node_modules/@angular/common/http/http.d.ts.__ivy_ngcc_bak

Last change on this file was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago

primeNG components

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