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