2021-06-28 19:54:20 +02:00
|
|
|
## API Report File for "@angular/common_http_testing"
|
|
|
|
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
|
|
|
import { HttpEvent } from '@angular/common/http';
|
|
|
|
import { HttpHeaders } from '@angular/common/http';
|
|
|
|
import { HttpRequest } from '@angular/common/http';
|
|
|
|
import { Observer } from 'rxjs';
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export class HttpClientTestingModule {
|
2017-03-22 17:13:24 -07:00
|
|
|
}
|
|
|
|
|
2021-06-28 19:54:20 +02:00
|
|
|
// @public
|
|
|
|
export abstract class HttpTestingController {
|
2017-07-07 14:56:36 -07:00
|
|
|
abstract expectNone(url: string, description?: string): void;
|
|
|
|
abstract expectNone(params: RequestMatch, description?: string): void;
|
|
|
|
abstract expectNone(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): void;
|
|
|
|
abstract expectNone(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): void;
|
|
|
|
abstract expectOne(url: string, description?: string): TestRequest;
|
|
|
|
abstract expectOne(params: RequestMatch, description?: string): TestRequest;
|
|
|
|
abstract expectOne(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
|
|
|
|
abstract expectOne(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
|
2017-03-22 17:13:24 -07:00
|
|
|
abstract match(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean)): TestRequest[];
|
|
|
|
abstract verify(opts?: {
|
|
|
|
ignoreCancelled?: boolean;
|
|
|
|
}): void;
|
|
|
|
}
|
|
|
|
|
2021-06-28 19:54:20 +02:00
|
|
|
// @public
|
|
|
|
export interface RequestMatch {
|
|
|
|
// (undocumented)
|
2017-03-22 17:13:24 -07:00
|
|
|
method?: string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2017-03-22 17:13:24 -07:00
|
|
|
url?: string;
|
|
|
|
}
|
|
|
|
|
2021-06-28 19:54:20 +02:00
|
|
|
// @public
|
|
|
|
export class TestRequest {
|
2017-03-22 17:13:24 -07:00
|
|
|
constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
|
2021-06-28 19:54:20 +02:00
|
|
|
get cancelled(): boolean;
|
2017-03-22 17:13:24 -07:00
|
|
|
error(error: ErrorEvent, opts?: {
|
|
|
|
headers?: HttpHeaders | {
|
|
|
|
[name: string]: string | string[];
|
|
|
|
};
|
|
|
|
status?: number;
|
|
|
|
statusText?: string;
|
|
|
|
}): void;
|
|
|
|
event(event: HttpEvent<any>): void;
|
2020-07-02 20:48:13 +05:30
|
|
|
flush(body: ArrayBuffer | Blob | boolean | string | number | Object | (boolean | string | number | Object | null)[] | null, opts?: {
|
2017-03-22 17:13:24 -07:00
|
|
|
headers?: HttpHeaders | {
|
|
|
|
[name: string]: string | string[];
|
|
|
|
};
|
|
|
|
status?: number;
|
|
|
|
statusText?: string;
|
|
|
|
}): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
request: HttpRequest<any>;
|
2017-03-22 17:13:24 -07:00
|
|
|
}
|
2021-06-28 19:54:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
|
|
|
|
```
|