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