mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
dfe7be4d2a
The static `ɵprov` field emitted on `@Injectable()` classes uses `ɵɵInjectableDeclaration<T>`.
When a subclass extends a generic `@Injectable()` base class with contravariant parameters
(such as callback/transformer methods depending on generic type parameters), TypeScript's
static side inheritance check (`typeof Sub extends typeof Super`) fails with `TS2417` because
`ɵɵInjectableDeclaration<Sub>` is not assignable to `ɵɵInjectableDeclaration<Super<any>>`.
Using `any` (`o.DYNAMIC_TYPE`) in `createInjectableType` avoids strict variance checks on
static inheritance for internal Ivy definitions and aligns with other Ivy declaration types.
(cherry picked from commit caeab598c9)
44 KiB
44 KiB
API Report File for "@angular/common_http"
Do not edit this file. It is a report generated by API Extractor.
import { EnvironmentInjector } from '@angular/core';
import { EnvironmentProviders } from '@angular/core';
import * as i0 from '@angular/core';
import { InjectionToken } from '@angular/core';
import { Injector } from '@angular/core';
import { ModuleWithProviders } from '@angular/core';
import { Observable } from 'rxjs';
import { Provider } from '@angular/core';
import { ResourceParamsContext } from '@angular/core';
import { ResourceRef } from '@angular/core';
import { Signal } from '@angular/core';
import { ValueEqualityFn } from '@angular/core';
import { WritableResource } from '@angular/core';
// @public
export class FetchBackend implements HttpBackend {
// (undocumented)
handle(request: HttpRequest<any>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FetchBackend, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public
export const HTTP_INTERCEPTORS: InjectionToken<readonly HttpInterceptor[]>;
// @public
export const HTTP_TRANSFER_CACHE_ORIGIN_MAP: InjectionToken<Record<string, string>>;
// @public
export abstract class HttpBackend implements HttpHandler {
// (undocumented)
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpBackend, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public
export class HttpClient {
constructor(handler: HttpHandler);
delete(url: string, options: {
observe?: 'body';
responseType: 'arraybuffer';
body?: any | null;
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
delete(url: string, options: {
observe?: 'body';
responseType: 'blob';
body?: any | null;
} & HttpClientCommonOptions): Observable<Blob>;
delete(url: string, options: {
observe?: 'body';
responseType: 'text';
body?: any | null;
} & HttpClientCommonOptions): Observable<string>;
delete(url: string, options: {
observe: 'events';
responseType: 'arraybuffer';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
delete(url: string, options: {
observe: 'events';
responseType: 'blob';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
delete(url: string, options: {
observe: 'events';
responseType: 'text';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
delete(url: string, options: {
observe: 'events';
responseType?: 'json';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpEvent<Object>>;
delete<T>(url: string, options: {
observe: 'events';
responseType?: 'json';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpEvent<T>>;
delete(url: string, options: {
observe: 'response';
responseType: 'arraybuffer';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
delete(url: string, options: {
observe: 'response';
responseType: 'blob';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
delete(url: string, options: {
observe: 'response';
responseType: 'text';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
delete(url: string, options: {
observe: 'response';
responseType?: 'json';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
delete<T>(url: string, options: {
observe: 'response';
responseType?: 'json';
body?: any | null;
} & HttpClientCommonOptions): Observable<HttpResponse<T>>;
delete(url: string, options?: {
observe?: 'body';
responseType?: 'json';
body?: any | null;
} & HttpClientCommonOptions): Observable<Object>;
delete<T>(url: string, options?: {
observe?: 'body';
responseType?: 'json';
body?: any | null;
} & HttpClientCommonOptions): Observable<T>;
get(url: string, options: {
observe?: 'body';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
get(url: string, options: {
observe?: 'body';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<Blob>;
get(url: string, options: {
observe?: 'body';
responseType: 'text';
} & HttpClientCommonOptions): Observable<string>;
get(url: string, options: {
observe: 'events';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
get(url: string, options: {
observe: 'events';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
get(url: string, options: {
observe: 'events';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
get(url: string, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<Object>>;
get<T>(url: string, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<T>>;
get(url: string, options: {
observe: 'response';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
get(url: string, options: {
observe: 'response';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
get(url: string, options: {
observe: 'response';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
get(url: string, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
get<T>(url: string, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<T>>;
get(url: string, options?: {
observe?: 'body';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<Object>;
get<T>(url: string, options?: {
observe?: 'body';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<T>;
head(url: string, options: {
observe?: 'body';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
head(url: string, options: {
observe?: 'body';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<Blob>;
head(url: string, options: {
observe?: 'body';
responseType: 'text';
} & HttpClientCommonOptions): Observable<string>;
head(url: string, options: {
observe: 'events';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
head(url: string, options: {
observe: 'events';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
head(url: string, options: {
observe: 'events';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
head(url: string, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<Object>>;
head<T>(url: string, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<T>>;
head(url: string, options: {
observe: 'response';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
head(url: string, options: {
observe: 'response';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
head(url: string, options: {
observe: 'response';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
head(url: string, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
head<T>(url: string, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<T>>;
head(url: string, options?: HttpClientCommonOptions): Observable<Object>;
head<T>(url: string, options?: HttpClientCommonOptions): Observable<T>;
// @deprecated
jsonp(url: string, callbackParam: string): Observable<Object>;
// @deprecated
jsonp<T>(url: string, callbackParam: string): Observable<T>;
options(url: string, options: {
observe?: 'body';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
options(url: string, options: {
observe?: 'body';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<Blob>;
options(url: string, options: {
observe?: 'body';
responseType: 'text';
} & HttpClientCommonOptions): Observable<string>;
options(url: string, options: {
observe: 'events';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
options(url: string, options: {
observe: 'events';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
options(url: string, options: {
observe: 'events';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
options(url: string, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<Object>>;
options<T>(url: string, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<T>>;
options(url: string, options: {
observe: 'response';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
options(url: string, options: {
observe: 'response';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
options(url: string, options: {
observe: 'response';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
options(url: string, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
options<T>(url: string, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<T>>;
options(url: string, options?: HttpClientCommonOptions): Observable<Object>;
options<T>(url: string, options?: HttpClientCommonOptions): Observable<T>;
patch(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
patch(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<Blob>;
patch(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'text';
} & HttpClientCommonOptions): Observable<string>;
patch(url: string, body: any | null, options: {
observe: 'events';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
patch(url: string, body: any | null, options: {
observe: 'events';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
patch(url: string, body: any | null, options: {
observe: 'events';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
patch(url: string, body: any | null, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<Object>>;
patch<T>(url: string, body: any | null, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<T>>;
patch(url: string, body: any | null, options: {
observe: 'response';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
patch(url: string, body: any | null, options: {
observe: 'response';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
patch(url: string, body: any | null, options: {
observe: 'response';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
patch(url: string, body: any | null, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
patch<T>(url: string, body: any | null, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<T>>;
patch(url: string, body: any | null, options?: HttpClientCommonOptions): Observable<Object>;
patch<T>(url: string, body: any | null, options?: HttpClientCommonOptions): Observable<T>;
post(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
post(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<Blob>;
post(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'text';
} & HttpClientCommonOptions): Observable<string>;
post(url: string, body: any | null, options: {
observe: 'events';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
post(url: string, body: any | null, options: {
observe: 'events';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
post(url: string, body: any | null, options: {
observe: 'events';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
post(url: string, body: any | null, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<Object>>;
post<T>(url: string, body: any | null, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<T>>;
post(url: string, body: any | null, options: {
observe: 'response';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
post(url: string, body: any | null, options: {
observe: 'response';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
post(url: string, body: any | null, options: {
observe: 'response';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
post(url: string, body: any | null, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
post<T>(url: string, body: any | null, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<T>>;
post(url: string, body: any | null, options?: HttpClientCommonOptions): Observable<Object>;
post<T>(url: string, body: any | null, options?: HttpClientCommonOptions): Observable<T>;
put(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
put(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<Blob>;
put(url: string, body: any | null, options: {
observe?: 'body';
responseType: 'text';
} & HttpClientCommonOptions): Observable<string>;
put(url: string, body: any | null, options: {
observe: 'events';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
put(url: string, body: any | null, options: {
observe: 'events';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
put(url: string, body: any | null, options: {
observe: 'events';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
put(url: string, body: any | null, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<Object>>;
put<T>(url: string, body: any | null, options: {
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<T>>;
put(url: string, body: any | null, options: {
observe: 'response';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
put(url: string, body: any | null, options: {
observe: 'response';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
put(url: string, body: any | null, options: {
observe: 'response';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
put(url: string, body: any | null, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
put<T>(url: string, body: any | null, options: {
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<T>>;
put(url: string, body: any | null, options?: HttpClientCommonOptions): Observable<Object>;
put<T>(url: string, body: any | null, options?: HttpClientCommonOptions): Observable<T>;
request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;
request(method: string, url: string, options: {
body?: any;
observe?: 'body';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<ArrayBuffer>;
request(method: string, url: string, options: {
body?: any;
observe?: 'body';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<Blob>;
request(method: string, url: string, options: {
body?: any;
observe?: 'body';
responseType: 'text';
} & HttpClientCommonOptions): Observable<string>;
request(method: string, url: string, options: {
body?: any;
observe: 'events';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpEvent<ArrayBuffer>>;
request(method: string, url: string, options: {
body?: any;
observe: 'events';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpEvent<Blob>>;
request(method: string, url: string, options: {
body?: any;
observe: 'events';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpEvent<string>>;
request(method: string, url: string, options: {
body?: any;
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<any>>;
request<R>(method: string, url: string, options: {
body?: any;
observe: 'events';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpEvent<R>>;
request(method: string, url: string, options: {
body?: any;
observe: 'response';
responseType: 'arraybuffer';
} & HttpClientCommonOptions): Observable<HttpResponse<ArrayBuffer>>;
request(method: string, url: string, options: {
body?: any;
observe: 'response';
responseType: 'blob';
} & HttpClientCommonOptions): Observable<HttpResponse<Blob>>;
request(method: string, url: string, options: {
body?: any;
observe: 'response';
responseType: 'text';
} & HttpClientCommonOptions): Observable<HttpResponse<string>>;
request(method: string, url: string, options: {
body?: any;
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<Object>>;
request<R>(method: string, url: string, options: {
body?: any;
observe: 'response';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<HttpResponse<R>>;
request(method: string, url: string, options?: {
body?: any;
observe?: 'body';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<Object>;
request<R>(method: string, url: string, options?: {
body?: any;
observe?: 'body';
responseType?: 'json';
} & HttpClientCommonOptions): Observable<R>;
request(method: string, url: string, options?: {
body?: any;
observe?: 'body' | 'events' | 'response';
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
} & HttpClientCommonOptions): Observable<any>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public
export interface HttpClientCommonOptions extends Omit<HttpRequestOptions, 'headers' | 'params'> {
// (undocumented)
headers?: HttpHeaders | {
[header: string]: string | string[];
};
// (undocumented)
observe?: 'body' | 'events' | 'response';
// (undocumented)
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
}
// @public @deprecated
export class HttpClientJsonpModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientJsonpModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientJsonpModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientJsonpModule, never, never, never>;
}
// @public @deprecated
export class HttpClientModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientModule, never, never, never>;
}
// @public @deprecated
export class HttpClientXsrfModule {
static disable(): ModuleWithProviders<HttpClientXsrfModule>;
static withOptions(options?: {
cookieName?: string;
headerName?: string;
}): ModuleWithProviders<HttpClientXsrfModule>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientXsrfModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientXsrfModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientXsrfModule, never, never, never>;
}
// @public
export class HttpContext {
delete(token: HttpContextToken<unknown>): HttpContext;
get<T>(token: HttpContextToken<T>): T;
has(token: HttpContextToken<unknown>): boolean;
// (undocumented)
keys(): IterableIterator<HttpContextToken<unknown>>;
set<T>(token: HttpContextToken<T>, value: T): HttpContext;
}
// @public
export class HttpContextToken<T> {
constructor(defaultValue: () => T);
// (undocumented)
readonly defaultValue: () => T;
}
// @public
export interface HttpDownloadProgressEvent extends HttpProgressEvent {
partialText?: string;
// (undocumented)
type: HttpEventType.DownloadProgress;
}
// @public
export class HttpErrorResponse extends HttpResponseBase implements Error {
constructor(init: {
error?: any;
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
redirected?: boolean;
responseType?: ResponseType;
});
// (undocumented)
readonly error: any | null;
// (undocumented)
readonly message: string;
// (undocumented)
readonly name = "HttpErrorResponse";
readonly ok = false;
}
// @public
export type HttpEvent<T> = HttpSentEvent | HttpHeaderResponse | HttpResponse<T> | HttpDownloadProgressEvent | HttpUploadProgressEvent | HttpUserEvent<T>;
// @public
export enum HttpEventType {
DownloadProgress = 3,
Response = 4,
ResponseHeader = 2,
Sent = 0,
UploadProgress = 1,
User = 5
}
// @public
export interface HttpFeature<KindT extends HttpFeatureKind> {
// (undocumented)
ɵkind: KindT;
// (undocumented)
ɵproviders: Provider[];
}
// @public
export enum HttpFeatureKind {
// (undocumented)
CustomXsrfConfiguration = 2,
// (undocumented)
Fetch = 6,
// (undocumented)
Interceptors = 0,
// (undocumented)
JsonpSupport = 4,
// (undocumented)
LegacyInterceptors = 1,
// (undocumented)
NoXsrfProtection = 3,
// (undocumented)
RequestsMadeViaParent = 5,
// (undocumented)
Xhr = 7
}
// @public
export abstract class HttpHandler {
// (undocumented)
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpHandler, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public
export type HttpHandlerFn = (req: HttpRequest<unknown>) => Observable<HttpEvent<unknown>>;
// @public
export class HttpHeaderResponse extends HttpResponseBase {
constructor(init?: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
});
clone(update?: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
}): HttpHeaderResponse;
// (undocumented)
readonly type: HttpEventType.ResponseHeader;
}
// @public
export class HttpHeaders {
constructor(headers?: string | {
[name: string]: string | number | (string | number)[];
} | Headers);
append(name: string, value: string | string[]): HttpHeaders;
delete(name: string, value?: string | string[]): HttpHeaders;
get(name: string): string | null;
getAll(name: string): string[] | null;
has(name: string): boolean;
keys(): string[];
set(name: string, value: string | string[]): HttpHeaders;
}
// @public
export interface HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
}
// @public
export type HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => Observable<HttpEvent<unknown>>;
// @public
export interface HttpParameterCodec {
// (undocumented)
decodeKey(key: string): string;
// (undocumented)
decodeValue(value: string): string;
// (undocumented)
encodeKey(key: string): string;
// (undocumented)
encodeValue(value: string): string;
}
// @public
export class HttpParams {
constructor(options?: HttpParamsOptions);
append(param: string, value: string | number | boolean): HttpParams;
appendAll(params: {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
}): HttpParams;
delete(param: string, value?: string | number | boolean): HttpParams;
get(param: string): string | null;
getAll(param: string): string[] | null;
has(param: string): boolean;
keys(): string[];
set(param: string, value: string | number | boolean): HttpParams;
toString(): string;
}
// @public
export interface HttpParamsOptions {
encoder?: HttpParameterCodec;
fromObject?: {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
fromString?: string;
}
// @public
export interface HttpProgressEvent {
loaded: number;
total?: number;
type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress;
}
// @public
export class HttpRequest<T> implements HttpRequestOptions {
constructor(method: 'GET' | 'HEAD', url: string, init?: HttpRequestOptions);
constructor(method: 'DELETE' | 'JSONP' | 'OPTIONS', url: string, init?: HttpRequestOptions);
constructor(method: 'POST', url: string, body: T | null, init?: HttpRequestOptions);
constructor(method: 'PUT' | 'PATCH', url: string, body: T | null, init?: HttpRequestOptions);
constructor(method: string, url: string, body: T | null, init?: HttpRequestOptions);
readonly body: T | null;
readonly cache: RequestCache;
// (undocumented)
clone(): HttpRequest<T>;
// (undocumented)
clone(update: HttpRequestOptions & {
body?: T | null;
method?: string;
url?: string;
setHeaders?: {
[name: string]: string | string[];
};
setParams?: {
[param: string]: string;
};
}): HttpRequest<T>;
// (undocumented)
clone<V>(update: HttpRequestOptions & {
body?: V | null;
method?: string;
url?: string;
setHeaders?: {
[name: string]: string | string[];
};
setParams?: {
[param: string]: string;
};
}): HttpRequest<V>;
readonly context: HttpContext;
readonly credentials: RequestCredentials;
detectContentTypeHeader(): string | null;
readonly headers: HttpHeaders;
readonly integrity: string;
readonly keepalive: boolean;
readonly method: string;
readonly mode: RequestMode;
readonly params: HttpParams;
readonly priority: RequestPriority;
readonly redirect: RequestRedirect;
readonly referrer: string;
readonly referrerPolicy: ReferrerPolicy;
// (undocumented)
readonly reportDownloadProgress: boolean;
// @deprecated
readonly reportProgress: boolean;
readonly reportUploadProgress: boolean;
readonly responseType: HttpResponseType;
serializeBody(): ArrayBuffer | Blob | FormData | URLSearchParams | string | null;
readonly timeout?: number;
readonly transferCache?: HttpTransferCacheRequestOptions;
// (undocumented)
readonly url: string;
readonly urlWithParams: string;
readonly withCredentials: boolean;
}
// @public
export interface HttpRequestOptions {
// (undocumented)
cache?: RequestCache;
// (undocumented)
context?: HttpContext;
// (undocumented)
credentials?: RequestCredentials;
// (undocumented)
headers?: HttpHeaders;
// (undocumented)
integrity?: string;
// (undocumented)
keepalive?: boolean;
// (undocumented)
mode?: RequestMode;
// (undocumented)
params?: HttpParams;
// (undocumented)
priority?: RequestPriority;
// (undocumented)
redirect?: RequestRedirect;
// (undocumented)
referrer?: string;
// (undocumented)
referrerPolicy?: ReferrerPolicy;
// (undocumented)
reportDownloadProgress?: boolean;
// @deprecated (undocumented)
reportProgress?: boolean;
reportUploadProgress?: boolean;
// (undocumented)
responseType?: HttpResponseType;
// (undocumented)
timeout?: number;
transferCache?: HttpTransferCacheRequestOptions;
// (undocumented)
withCredentials?: boolean;
}
// @public
export const httpResource: HttpResourceFn;
// @public
export interface HttpResourceFn {
<TResult = unknown>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, unknown> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = unknown>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
<TResult = unknown>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, unknown> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = unknown>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
arrayBuffer: {
<TResult = ArrayBuffer>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = ArrayBuffer>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
<TResult = ArrayBuffer>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = ArrayBuffer>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
};
blob: {
<TResult = Blob>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, Blob> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = Blob>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
<TResult = Blob>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, Blob> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = Blob>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
};
text: {
<TResult = string>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, string> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = string>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
<TResult = string>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, string> & {
defaultValue: NoInfer<TResult>;
}): HttpResourceRef<TResult>;
<TResult = string>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
};
}
// @public
export interface HttpResourceOptions<TResult, TRaw> {
debugName?: string;
defaultValue?: NoInfer<TResult>;
equal?: ValueEqualityFn<NoInfer<TResult>>;
injector?: Injector;
parse?: (value: TRaw) => TResult;
}
// @public
export interface HttpResourceRef<T> extends WritableResource<T>, ResourceRef<T> {
// (undocumented)
destroy(): void;
// (undocumented)
hasValue(this: T extends undefined ? this : never): this is HttpResourceRef<Exclude<T, undefined>>;
// (undocumented)
hasValue(): boolean;
readonly headers: Signal<HttpHeaders | undefined>;
readonly progress: Signal<HttpProgressEvent | undefined>;
readonly statusCode: Signal<number | undefined>;
}
// @public
export interface HttpResourceRequest {
body?: unknown;
cache?: RequestCache | (string & {});
context?: HttpContext;
credentials?: RequestCredentials | (string & {});
headers?: HttpHeaders | Record<string, string | ReadonlyArray<string>>;
integrity?: string;
keepalive?: boolean;
method?: string;
mode?: RequestMode | (string & {});
params?: HttpParams | Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;
priority?: RequestPriority | (string & {});
redirect?: RequestRedirect | (string & {});
referrer?: string;
referrerPolicy?: ReferrerPolicy | (string & {});
reportProgress?: boolean;
timeout?: number;
transferCache?: {
includeHeaders?: string[];
} | boolean;
url: string;
withCredentials?: boolean;
}
// @public
export class HttpResponse<T> extends HttpResponseBase {
constructor(init?: {
body?: T | null;
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
redirected?: boolean;
responseType?: ResponseType;
});
readonly body: T | null;
// (undocumented)
clone(): HttpResponse<T>;
// (undocumented)
clone(update: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
redirected?: boolean;
responseType?: ResponseType;
}): HttpResponse<T>;
// (undocumented)
clone<V>(update: {
body?: V | null;
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
redirected?: boolean;
responseType?: ResponseType;
}): HttpResponse<V>;
// (undocumented)
readonly type: HttpEventType.Response;
}
// @public
export abstract class HttpResponseBase {
constructor(init: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
redirected?: boolean;
responseType?: ResponseType;
}, defaultStatus?: number, defaultStatusText?: string);
readonly headers: HttpHeaders;
readonly ok: boolean;
readonly redirected?: boolean;
readonly responseType?: ResponseType;
readonly status: number;
// @deprecated
readonly statusText: string;
readonly type: HttpEventType.Response | HttpEventType.ResponseHeader;
readonly url: string | null;
}
// @public
export interface HttpSentEvent {
// (undocumented)
type: HttpEventType.Sent;
}
// @public
export enum HttpStatusCode {
// (undocumented)
Accepted = 202,
// (undocumented)
AlreadyReported = 208,
// (undocumented)
BadGateway = 502,
// (undocumented)
BadRequest = 400,
// (undocumented)
Conflict = 409,
// (undocumented)
Continue = 100,
// (undocumented)
Created = 201,
// (undocumented)
EarlyHints = 103,
// (undocumented)
ExpectationFailed = 417,
// (undocumented)
FailedDependency = 424,
// (undocumented)
Forbidden = 403,
// (undocumented)
Found = 302,
// (undocumented)
GatewayTimeout = 504,
// (undocumented)
Gone = 410,
// (undocumented)
HttpVersionNotSupported = 505,
// (undocumented)
ImATeapot = 418,
// (undocumented)
ImUsed = 226,
// (undocumented)
InsufficientStorage = 507,
// (undocumented)
InternalServerError = 500,
// (undocumented)
LengthRequired = 411,
// (undocumented)
Locked = 423,
// (undocumented)
LoopDetected = 508,
// (undocumented)
MethodNotAllowed = 405,
// (undocumented)
MisdirectedRequest = 421,
// (undocumented)
MovedPermanently = 301,
// (undocumented)
MultipleChoices = 300,
// (undocumented)
MultiStatus = 207,
// (undocumented)
NetworkAuthenticationRequired = 511,
// (undocumented)
NoContent = 204,
// (undocumented)
NonAuthoritativeInformation = 203,
// (undocumented)
NotAcceptable = 406,
// (undocumented)
NotExtended = 510,
// (undocumented)
NotFound = 404,
// (undocumented)
NotImplemented = 501,
// (undocumented)
NotModified = 304,
// (undocumented)
Ok = 200,
// (undocumented)
PartialContent = 206,
// (undocumented)
PayloadTooLarge = 413,
// (undocumented)
PaymentRequired = 402,
// (undocumented)
PermanentRedirect = 308,
// (undocumented)
PreconditionFailed = 412,
// (undocumented)
PreconditionRequired = 428,
// (undocumented)
Processing = 102,
// (undocumented)
ProxyAuthenticationRequired = 407,
// (undocumented)
RangeNotSatisfiable = 416,
// (undocumented)
RequestHeaderFieldsTooLarge = 431,
// (undocumented)
RequestTimeout = 408,
// (undocumented)
ResetContent = 205,
// (undocumented)
SeeOther = 303,
// (undocumented)
ServiceUnavailable = 503,
// (undocumented)
SwitchingProtocols = 101,
// (undocumented)
TemporaryRedirect = 307,
// (undocumented)
TooEarly = 425,
// (undocumented)
TooManyRequests = 429,
// (undocumented)
Unauthorized = 401,
// (undocumented)
UnavailableForLegalReasons = 451,
// (undocumented)
UnprocessableEntity = 422,
// (undocumented)
UnsupportedMediaType = 415,
// (undocumented)
Unused = 306,
// (undocumented)
UpgradeRequired = 426,
// (undocumented)
UriTooLong = 414,
// (undocumented)
UseProxy = 305,
// (undocumented)
VariantAlsoNegotiates = 506
}
// @public
export interface HttpTransferCacheOptions {
filter?: (req: HttpRequest<unknown>) => boolean;
includeHeaders?: string[];
includeNonCacheableRequests?: boolean;
includePostRequests?: boolean;
includeRequestsWithAuthHeaders?: boolean;
includeRequestsWithCredentials?: boolean;
}
// @public
export interface HttpUploadProgressEvent extends HttpProgressEvent {
// (undocumented)
type: HttpEventType.UploadProgress;
}
// @public
export class HttpUrlEncodingCodec implements HttpParameterCodec {
decodeKey(key: string): string;
decodeValue(value: string): string;
encodeKey(key: string): string;
encodeValue(value: string): string;
}
// @public
export interface HttpUserEvent<T> {
// (undocumented)
type: HttpEventType.User;
}
// @public
export class HttpXhrBackend implements HttpBackend {
constructor(xhrFactory: XhrFactory);
handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpXhrBackend, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public
export abstract class HttpXsrfTokenExtractor {
abstract getToken(): string | null;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpXsrfTokenExtractor, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public @deprecated
export class JsonpClientBackend implements HttpBackend {
constructor(callbackMap: JsonpCallbackContext, document: any);
handle(req: HttpRequest<never>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<JsonpClientBackend, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public @deprecated
export class JsonpInterceptor {
constructor(injector: EnvironmentInjector);
intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<JsonpInterceptor, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
// @public
export function provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders;
// @public @deprecated
export function withFetch(): HttpFeature<HttpFeatureKind.Fetch>;
// @public
export function withInterceptors(interceptorFns: HttpInterceptorFn[]): HttpFeature<HttpFeatureKind.Interceptors>;
// @public
export function withInterceptorsFromDi(): HttpFeature<HttpFeatureKind.LegacyInterceptors>;
// @public @deprecated
export function withJsonpSupport(): HttpFeature<HttpFeatureKind.JsonpSupport>;
// @public
export function withNoXsrfProtection(): HttpFeature<HttpFeatureKind.NoXsrfProtection>;
// @public
export function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.RequestsMadeViaParent>;
// @public
export function withXhr(): HttpFeature<HttpFeatureKind.Xhr>;
// @public
export function withXsrfConfiguration(input: {
cookieName?: string;
headerName?: string;
}): HttpFeature<HttpFeatureKind.CustomXsrfConfiguration>;
// (No @packageDocumentation comment for this package)