fix(common): document HttpClient, fixing a few other issues
This commit is contained in:
parent
ce0f4f0d7c
commit
18559897a0
|
@ -11,6 +11,15 @@ import {HttpRequest} from './request';
|
||||||
import {HttpEvent} from './response';
|
import {HttpEvent} from './response';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
|
||||||
|
* `HttpResponse`.
|
||||||
|
*
|
||||||
|
* `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
|
||||||
|
* first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
|
||||||
|
* `HttpBackend`.
|
||||||
|
*
|
||||||
|
* In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
|
||||||
|
*
|
||||||
* @experimental
|
* @experimental
|
||||||
*/
|
*/
|
||||||
export abstract class HttpHandler {
|
export abstract class HttpHandler {
|
||||||
|
@ -18,6 +27,13 @@ export abstract class HttpHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
|
||||||
|
*
|
||||||
|
* Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
|
||||||
|
*
|
||||||
|
* When injected, `HttpBackend` dispatches requests directly to the backend, without going
|
||||||
|
* through the interceptor chain.
|
||||||
|
*
|
||||||
* @experimental
|
* @experimental
|
||||||
*/
|
*/
|
||||||
export abstract class HttpBackend implements HttpHandler {
|
export abstract class HttpBackend implements HttpHandler {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -32,22 +32,86 @@ export abstract class HttpTestingController {
|
||||||
*/
|
*/
|
||||||
abstract match(match: string|RequestMatch|((req: HttpRequest<any>) => boolean)): TestRequest[];
|
abstract match(match: string|RequestMatch|((req: HttpRequest<any>) => boolean)): TestRequest[];
|
||||||
|
|
||||||
// Expect that exactly one request matches the given parameter.
|
/**
|
||||||
|
* Expect that a single request has been made which matches the given URL, and return its
|
||||||
|
* mock.
|
||||||
|
*
|
||||||
|
* If no such request has been made, or more than one such request has been made, fail with an
|
||||||
|
* error message including the given request description, if any.
|
||||||
|
*/
|
||||||
abstract expectOne(url: string, description?: string): TestRequest;
|
abstract expectOne(url: string, description?: string): TestRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expect that a single request has been made which matches the given parameters, and return
|
||||||
|
* its mock.
|
||||||
|
*
|
||||||
|
* If no such request has been made, or more than one such request has been made, fail with an
|
||||||
|
* error message including the given request description, if any.
|
||||||
|
*/
|
||||||
abstract expectOne(params: RequestMatch, description?: string): TestRequest;
|
abstract expectOne(params: RequestMatch, description?: string): TestRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expect that a single request has been made which matches the given predicate function, and
|
||||||
|
* return its mock.
|
||||||
|
*
|
||||||
|
* If no such request has been made, or more than one such request has been made, fail with an
|
||||||
|
* error message including the given request description, if any.
|
||||||
|
*/
|
||||||
abstract expectOne(matchFn: ((req: HttpRequest<any>) => boolean), description?: string):
|
abstract expectOne(matchFn: ((req: HttpRequest<any>) => boolean), description?: string):
|
||||||
TestRequest;
|
TestRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expect that a single request has been made which matches the given condition, and return
|
||||||
|
* its mock.
|
||||||
|
*
|
||||||
|
* If no such request has been made, or more than one such request has been made, fail with an
|
||||||
|
* error message including the given request description, if any.
|
||||||
|
*/
|
||||||
abstract expectOne(
|
abstract expectOne(
|
||||||
match: string|RequestMatch|((req: HttpRequest<any>) => boolean),
|
match: string|RequestMatch|((req: HttpRequest<any>) => boolean),
|
||||||
description?: string): TestRequest;
|
description?: string): TestRequest;
|
||||||
|
|
||||||
// Assert that no requests match the given parameter.
|
/**
|
||||||
|
* Expect that no requests have been made which match the given URL.
|
||||||
|
*
|
||||||
|
* If a matching request has been made, fail with an error message including the given request
|
||||||
|
* description, if any.
|
||||||
|
*/
|
||||||
abstract expectNone(url: string, description?: string): void;
|
abstract expectNone(url: string, description?: string): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expect that no requests have been made which match the given parameters.
|
||||||
|
*
|
||||||
|
* If a matching request has been made, fail with an error message including the given request
|
||||||
|
* description, if any.
|
||||||
|
*/
|
||||||
abstract expectNone(params: RequestMatch, description?: string): void;
|
abstract expectNone(params: RequestMatch, description?: string): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expect that no requests have been made which match the given predicate function.
|
||||||
|
*
|
||||||
|
* If a matching request has been made, fail with an error message including the given request
|
||||||
|
* description, if any.
|
||||||
|
*/
|
||||||
abstract expectNone(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): void;
|
abstract expectNone(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expect that no requests have been made which match the given condition.
|
||||||
|
*
|
||||||
|
* If a matching request has been made, fail with an error message including the given request
|
||||||
|
* description, if any.
|
||||||
|
*/
|
||||||
abstract expectNone(
|
abstract expectNone(
|
||||||
match: string|RequestMatch|((req: HttpRequest<any>) => boolean), description?: string): void;
|
match: string|RequestMatch|((req: HttpRequest<any>) => boolean), description?: string): void;
|
||||||
|
|
||||||
// Validate that all requests which were issued were flushed.
|
/**
|
||||||
|
* Verify that no unmatched requests are outstanding.
|
||||||
|
*
|
||||||
|
* If any requests are outstanding, fail with an error message indicating which requests were not
|
||||||
|
* handled.
|
||||||
|
*
|
||||||
|
* If `ignoreCancelled` is not set (the default), `verify()` will also fail if cancelled requests
|
||||||
|
* were not explicitly matched.
|
||||||
|
*/
|
||||||
abstract verify(opts?: {ignoreCancelled?: boolean}): void;
|
abstract verify(opts?: {ignoreCancelled?: boolean}): void;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,10 +38,10 @@ export class HttpClientTestingBackend implements HttpBackend, HttpTestingControl
|
||||||
* Handle an incoming request by queueing it in the list of open requests.
|
* Handle an incoming request by queueing it in the list of open requests.
|
||||||
*/
|
*/
|
||||||
handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {
|
handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {
|
||||||
return new Observable((observer: Observer<HttpEvent<any>>) => {
|
return new Observable((observer: Observer<any>) => {
|
||||||
const testReq = new TestRequest(req, observer);
|
const testReq = new TestRequest(req, observer);
|
||||||
this.open.push(testReq);
|
this.open.push(testReq);
|
||||||
observer.next({type: HttpEventType.Sent});
|
observer.next({ type: HttpEventType.Sent } as HttpEvent<any>);
|
||||||
return () => { testReq._cancelled = true; };
|
return () => { testReq._cancelled = true; };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,12 @@ export class TestRequest {
|
||||||
|
|
||||||
constructor(public request: HttpRequest<any>, private observer: Observer<HttpEvent<any>>) {}
|
constructor(public request: HttpRequest<any>, private observer: Observer<HttpEvent<any>>) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolve the request by returning a body plus additional HTTP information (such as response
|
||||||
|
* headers) if provided.
|
||||||
|
*
|
||||||
|
* Both successful and unsuccessful responses can be delivered via `flush()`.
|
||||||
|
*/
|
||||||
flush(body: ArrayBuffer|Blob|string|number|Object|(string|number|Object|null)[]|null, opts: {
|
flush(body: ArrayBuffer|Blob|string|number|Object|(string|number|Object|null)[]|null, opts: {
|
||||||
headers?: HttpHeaders | {[name: string]: string | string[]},
|
headers?: HttpHeaders | {[name: string]: string | string[]},
|
||||||
status?: number,
|
status?: number,
|
||||||
|
@ -65,6 +70,9 @@ export class TestRequest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolve the request by returning an `ErrorEvent` (e.g. simulating a network failure).
|
||||||
|
*/
|
||||||
error(error: ErrorEvent, opts: {
|
error(error: ErrorEvent, opts: {
|
||||||
headers?: HttpHeaders | {[name: string]: string | string[]},
|
headers?: HttpHeaders | {[name: string]: string | string[]},
|
||||||
status?: number,
|
status?: number,
|
||||||
|
@ -87,6 +95,10 @@ export class TestRequest {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deliver an arbitrary `HttpEvent` (such as a progress event) on the response stream for this
|
||||||
|
* request.
|
||||||
|
*/
|
||||||
event(event: HttpEvent<any>): void {
|
event(event: HttpEvent<any>): void {
|
||||||
if (this.cancelled) {
|
if (this.cancelled) {
|
||||||
throw new Error(`Cannot send events to a cancelled request.`);
|
throw new Error(`Cannot send events to a cancelled request.`);
|
||||||
|
|
|
@ -23,83 +23,6 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Object>;
|
}): Observable<Object>;
|
||||||
delete<T>(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<T>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<Object>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'text';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<string>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'blob';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<Blob>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'arraybuffer';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<ArrayBuffer>>;
|
|
||||||
delete<T>(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<T>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<Object>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'text';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<string>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'blob';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<Blob>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'arraybuffer';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<ArrayBuffer>>;
|
|
||||||
delete(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'text';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<string>;
|
|
||||||
delete(url: string, options: {
|
delete(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -114,41 +37,83 @@ export declare class HttpClient {
|
||||||
responseType: 'blob';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Blob>;
|
}): Observable<Blob>;
|
||||||
get<T>(url: string, options: {
|
delete(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<T>>;
|
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'text';
|
responseType: 'text';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<string>;
|
}): Observable<string>;
|
||||||
get(url: string, options: {
|
delete(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'blob';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<Blob>;
|
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'arraybuffer';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<ArrayBuffer>>;
|
}): Observable<HttpEvent<ArrayBuffer>>;
|
||||||
get(url: string, options: {
|
delete(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'blob';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<Blob>>;
|
}): Observable<HttpEvent<Blob>>;
|
||||||
|
delete(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<string>>;
|
||||||
|
delete(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<Object>>;
|
||||||
|
delete<T>(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<T>>;
|
||||||
|
delete(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'arraybuffer';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<ArrayBuffer>>;
|
||||||
|
delete(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'blob';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<Blob>>;
|
||||||
|
delete(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<string>>;
|
||||||
|
delete(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<Object>>;
|
||||||
|
delete<T>(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<T>>;
|
||||||
get(url: string, options: {
|
get(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
|
@ -156,55 +121,6 @@ export declare class HttpClient {
|
||||||
responseType: 'text';
|
responseType: 'text';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<string>>;
|
}): Observable<HttpEvent<string>>;
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<Object>>;
|
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'arraybuffer';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<ArrayBuffer>;
|
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'arraybuffer';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<ArrayBuffer>>;
|
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'blob';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<Blob>>;
|
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'text';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<string>>;
|
|
||||||
get(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<Object>>;
|
|
||||||
get<T>(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<T>>;
|
|
||||||
get(url: string, options?: {
|
get(url: string, options?: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -212,6 +128,41 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Object>;
|
}): Observable<Object>;
|
||||||
|
get(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'arraybuffer';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<ArrayBuffer>;
|
||||||
|
get(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'blob';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<Blob>;
|
||||||
|
get(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<string>;
|
||||||
|
get(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'arraybuffer';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<ArrayBuffer>>;
|
||||||
|
get(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'blob';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<Blob>>;
|
||||||
get<T>(url: string, options?: {
|
get<T>(url: string, options?: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -219,48 +170,83 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<T>;
|
}): Observable<T>;
|
||||||
head(url: string, options: {
|
get(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'arraybuffer';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<ArrayBuffer>>;
|
|
||||||
head(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'text';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<string>>;
|
|
||||||
head(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<Object>>;
|
}): Observable<HttpEvent<Object>>;
|
||||||
head<T>(url: string, options: {
|
get<T>(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<T>>;
|
}): Observable<HttpEvent<T>>;
|
||||||
head(url: string, options: {
|
get(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe: 'response';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'arraybuffer';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpResponse<ArrayBuffer>>;
|
}): Observable<HttpResponse<ArrayBuffer>>;
|
||||||
head(url: string, options: {
|
get(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe: 'response';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'blob';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpResponse<Blob>>;
|
}): Observable<HttpResponse<Blob>>;
|
||||||
|
get(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<string>>;
|
||||||
|
get(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<Object>>;
|
||||||
|
get<T>(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<T>>;
|
||||||
|
head<T>(url: string, options?: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<T>;
|
||||||
|
head(url: string, options?: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<Object>;
|
||||||
|
head<T>(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<T>>;
|
||||||
|
head(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<Object>>;
|
||||||
head(url: string, options: {
|
head(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe: 'response';
|
||||||
|
@ -272,37 +258,37 @@ export declare class HttpClient {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe: 'response';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpResponse<Object>>;
|
}): Observable<HttpResponse<Blob>>;
|
||||||
head<T>(url: string, options: {
|
head(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe: 'response';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpResponse<T>>;
|
}): Observable<HttpResponse<ArrayBuffer>>;
|
||||||
head(url: string, options?: {
|
head<T>(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Object>;
|
}): Observable<HttpEvent<T>>;
|
||||||
head<T>(url: string, options?: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<T>;
|
|
||||||
head(url: string, options: {
|
head(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<Object>>;
|
||||||
|
head(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'text';
|
responseType: 'text';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<string>;
|
}): Observable<HttpEvent<string>>;
|
||||||
head(url: string, options: {
|
head(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
|
@ -312,11 +298,18 @@ export declare class HttpClient {
|
||||||
}): Observable<HttpEvent<Blob>>;
|
}): Observable<HttpEvent<Blob>>;
|
||||||
head(url: string, options: {
|
head(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'arraybuffer';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<ArrayBuffer>;
|
}): Observable<HttpEvent<ArrayBuffer>>;
|
||||||
|
head(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<string>;
|
||||||
head(url: string, options: {
|
head(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -324,15 +317,22 @@ export declare class HttpClient {
|
||||||
responseType: 'blob';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Blob>;
|
}): Observable<Blob>;
|
||||||
jsonp(url: string, callbackParam: string): Observable<any>;
|
head(url: string, options: {
|
||||||
jsonp<T>(url: string, callbackParam: string): Observable<T>;
|
|
||||||
options(url: string, options: {
|
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe?: 'body';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'arraybuffer';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpResponse<ArrayBuffer>>;
|
}): Observable<ArrayBuffer>;
|
||||||
|
jsonp<T>(url: string, callbackParam: string): Observable<T>;
|
||||||
|
jsonp(url: string, callbackParam: string): Observable<Object>;
|
||||||
|
options(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<Object>>;
|
||||||
options(url: string, options: {
|
options(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -340,6 +340,13 @@ export declare class HttpClient {
|
||||||
responseType: 'arraybuffer';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<ArrayBuffer>;
|
}): Observable<ArrayBuffer>;
|
||||||
|
options(url: string, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'blob';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<Blob>;
|
||||||
options(url: string, options: {
|
options(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -368,13 +375,13 @@ export declare class HttpClient {
|
||||||
responseType: 'text';
|
responseType: 'text';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<string>>;
|
}): Observable<HttpEvent<string>>;
|
||||||
options(url: string, options: {
|
options<T>(url: string, options?: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe?: 'body';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<Object>>;
|
}): Observable<T>;
|
||||||
options<T>(url: string, options: {
|
options<T>(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
|
@ -384,11 +391,11 @@ export declare class HttpClient {
|
||||||
}): Observable<HttpEvent<T>>;
|
}): Observable<HttpEvent<T>>;
|
||||||
options(url: string, options: {
|
options(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe: 'response';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'blob';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Blob>;
|
}): Observable<HttpResponse<ArrayBuffer>>;
|
||||||
options(url: string, options: {
|
options(url: string, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe: 'response';
|
||||||
|
@ -424,20 +431,20 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Object>;
|
}): Observable<Object>;
|
||||||
options<T>(url: string, options?: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<T>;
|
|
||||||
patch(url: string, body: any | null, options: {
|
patch(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<Object>>;
|
}): Observable<HttpEvent<Blob>>;
|
||||||
|
patch(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<string>>;
|
||||||
patch(url: string, body: any | null, options: {
|
patch(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -466,69 +473,6 @@ export declare class HttpClient {
|
||||||
responseType: 'arraybuffer';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<ArrayBuffer>>;
|
}): Observable<HttpEvent<ArrayBuffer>>;
|
||||||
patch(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'blob';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<Blob>>;
|
|
||||||
patch(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'text';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<string>>;
|
|
||||||
patch<T>(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'events';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpEvent<T>>;
|
|
||||||
patch(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'arraybuffer';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<ArrayBuffer>>;
|
|
||||||
patch(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'blob';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<Blob>>;
|
|
||||||
patch(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'text';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<string>>;
|
|
||||||
patch(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<Object>>;
|
|
||||||
patch<T>(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe: 'response';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<HttpResponse<T>>;
|
|
||||||
patch(url: string, body: any | null, options?: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<Object>;
|
|
||||||
patch<T>(url: string, body: any | null, options?: {
|
patch<T>(url: string, body: any | null, options?: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -536,13 +480,76 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<T>;
|
}): Observable<T>;
|
||||||
post<T>(url: string, body: any | null, options: {
|
patch(url: string, body: any | null, options?: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<Object>;
|
||||||
|
patch(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<Object>>;
|
||||||
|
patch<T>(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<T>>;
|
}): Observable<HttpEvent<T>>;
|
||||||
|
patch(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'arraybuffer';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<ArrayBuffer>>;
|
||||||
|
patch(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'blob';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<Blob>>;
|
||||||
|
patch(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<string>>;
|
||||||
|
patch(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<Object>>;
|
||||||
|
patch<T>(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<T>>;
|
||||||
|
post(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<string>>;
|
||||||
|
post(url: string, body: any | null, options?: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<Object>;
|
||||||
post(url: string, body: any | null, options: {
|
post(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -550,6 +557,13 @@ export declare class HttpClient {
|
||||||
responseType: 'arraybuffer';
|
responseType: 'arraybuffer';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<ArrayBuffer>;
|
}): Observable<ArrayBuffer>;
|
||||||
|
post(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'blob';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<Blob>;
|
||||||
post(url: string, body: any | null, options: {
|
post(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -571,13 +585,13 @@ export declare class HttpClient {
|
||||||
responseType: 'blob';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<Blob>>;
|
}): Observable<HttpEvent<Blob>>;
|
||||||
post(url: string, body: any | null, options: {
|
post<T>(url: string, body: any | null, options?: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe?: 'body';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'text';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<string>>;
|
}): Observable<T>;
|
||||||
post(url: string, body: any | null, options: {
|
post(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
|
@ -585,13 +599,13 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<Object>>;
|
}): Observable<HttpEvent<Object>>;
|
||||||
post(url: string, body: any | null, options: {
|
post<T>(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'blob';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Blob>;
|
}): Observable<HttpEvent<T>>;
|
||||||
post(url: string, body: any | null, options: {
|
post(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'response';
|
observe: 'response';
|
||||||
|
@ -627,20 +641,6 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpResponse<T>>;
|
}): Observable<HttpResponse<T>>;
|
||||||
post(url: string, body: any | null, options?: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<Object>;
|
|
||||||
post<T>(url: string, body: any | null, options?: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType?: 'json';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<T>;
|
|
||||||
put(url: string, body: any | null, options?: {
|
put(url: string, body: any | null, options?: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -689,13 +689,6 @@ export declare class HttpClient {
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<T>>;
|
}): Observable<HttpEvent<T>>;
|
||||||
put(url: string, body: any | null, options: {
|
|
||||||
headers?: HttpHeaders;
|
|
||||||
observe?: 'body';
|
|
||||||
params?: HttpParams;
|
|
||||||
responseType: 'arraybuffer';
|
|
||||||
withCredentials?: boolean;
|
|
||||||
}): Observable<ArrayBuffer>;
|
|
||||||
put(url: string, body: any | null, options: {
|
put(url: string, body: any | null, options: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
|
@ -738,6 +731,13 @@ export declare class HttpClient {
|
||||||
responseType: 'blob';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<Blob>;
|
}): Observable<Blob>;
|
||||||
|
put(url: string, body: any | null, options: {
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe?: 'body';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'arraybuffer';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<ArrayBuffer>;
|
||||||
put<T>(url: string, body: any | null, options?: {
|
put<T>(url: string, body: any | null, options?: {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe?: 'body';
|
observe?: 'body';
|
||||||
|
@ -750,9 +750,9 @@ export declare class HttpClient {
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
responseType: 'text';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<string>>;
|
}): Observable<HttpEvent<any>>;
|
||||||
request<R>(method: string, url: string, options?: {
|
request<R>(method: string, url: string, options?: {
|
||||||
body?: any;
|
body?: any;
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
|
@ -801,6 +801,14 @@ export declare class HttpClient {
|
||||||
responseType: 'blob';
|
responseType: 'blob';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<Blob>>;
|
}): Observable<HttpEvent<Blob>>;
|
||||||
|
request(method: string, url: string, options: {
|
||||||
|
body?: any;
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'events';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType: 'text';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpEvent<string>>;
|
||||||
request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;
|
request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;
|
||||||
request<R>(method: string, url: string, options: {
|
request<R>(method: string, url: string, options: {
|
||||||
body?: any;
|
body?: any;
|
||||||
|
@ -834,6 +842,14 @@ export declare class HttpClient {
|
||||||
responseType: 'text';
|
responseType: 'text';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpResponse<string>>;
|
}): Observable<HttpResponse<string>>;
|
||||||
|
request(method: string, url: string, options: {
|
||||||
|
body?: any;
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
observe: 'response';
|
||||||
|
params?: HttpParams;
|
||||||
|
responseType?: 'json';
|
||||||
|
withCredentials?: boolean;
|
||||||
|
}): Observable<HttpResponse<Object>>;
|
||||||
request<R>(method: string, url: string, options: {
|
request<R>(method: string, url: string, options: {
|
||||||
body?: any;
|
body?: any;
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
|
|
Loading…
Reference in New Issue