2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class BaseRequestOptions extends RequestOptions {
|
|
|
|
constructor();
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class BaseResponseOptions extends ResponseOptions {
|
|
|
|
constructor();
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class BrowserXhr {
|
|
|
|
constructor();
|
|
|
|
build(): any;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class Connection {
|
|
|
|
readyState: ReadyState;
|
|
|
|
request: Request;
|
|
|
|
response: any;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ConnectionBackend {
|
|
|
|
abstract createConnection(request: any): Connection;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class CookieXSRFStrategy implements XSRFStrategy {
|
|
|
|
constructor(_cookieName?: string, _headerName?: string);
|
|
|
|
configureRequest(req: Request): void;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class Headers {
|
|
|
|
constructor(headers?: Headers | {
|
2016-10-03 18:27:56 -04:00
|
|
|
[name: string]: any;
|
2017-04-17 14:12:53 -04:00
|
|
|
} | null);
|
2016-06-22 17:56:10 -04:00
|
|
|
append(name: string, value: string): void;
|
|
|
|
delete(name: string): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
entries(): void;
|
2017-04-17 14:12:53 -04:00
|
|
|
forEach(fn: (values: string[], name: string | undefined, headers: Map<string, string[]>) => void): void;
|
|
|
|
get(name: string): string | null;
|
|
|
|
getAll(name: string): string[] | null;
|
2016-10-03 18:27:56 -04:00
|
|
|
has(name: string): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
keys(): string[];
|
2016-10-03 18:27:56 -04:00
|
|
|
set(name: string, value: string | string[]): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
toJSON(): {
|
2016-10-03 18:27:56 -04:00
|
|
|
[name: string]: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
};
|
2016-06-23 21:19:32 -04:00
|
|
|
values(): string[][];
|
|
|
|
static fromResponseHeaderString(headersString: string): Headers;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class Http {
|
|
|
|
protected _backend: ConnectionBackend;
|
|
|
|
protected _defaultOptions: RequestOptions;
|
|
|
|
constructor(_backend: ConnectionBackend, _defaultOptions: RequestOptions);
|
2016-06-23 21:19:32 -04:00
|
|
|
delete(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
2016-06-22 17:56:10 -04:00
|
|
|
get(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
2016-06-23 21:19:32 -04:00
|
|
|
head(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
2016-08-08 12:15:13 -04:00
|
|
|
options(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
2016-06-23 21:19:32 -04:00
|
|
|
patch(url: string, body: any, options?: RequestOptionsArgs): Observable<Response>;
|
2016-06-22 17:56:10 -04:00
|
|
|
post(url: string, body: any, options?: RequestOptionsArgs): Observable<Response>;
|
|
|
|
put(url: string, body: any, options?: RequestOptionsArgs): Observable<Response>;
|
2016-06-23 21:19:32 -04:00
|
|
|
request(url: string | Request, options?: RequestOptionsArgs): Observable<Response>;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-07-27 16:09:05 -04:00
|
|
|
export declare class HttpModule {
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class Jsonp extends Http {
|
|
|
|
constructor(backend: ConnectionBackend, defaultOptions: RequestOptions);
|
|
|
|
request(url: string | Request, options?: RequestOptionsArgs): Observable<Response>;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2017-09-12 14:45:02 -04:00
|
|
|
export declare class JSONPBackend extends ConnectionBackend {
|
|
|
|
createConnection(request: Request): JSONPConnection;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2017-09-12 14:45:02 -04:00
|
|
|
export declare class JSONPConnection implements Connection {
|
2016-06-22 17:56:10 -04:00
|
|
|
readyState: ReadyState;
|
|
|
|
request: Request;
|
|
|
|
response: Observable<Response>;
|
2017-09-12 14:45:02 -04:00
|
|
|
finished(data?: any): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-07-27 16:09:05 -04:00
|
|
|
export declare class JsonpModule {
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-28 14:31:35 -04:00
|
|
|
export declare class QueryEncoder {
|
2018-09-20 10:01:01 -04:00
|
|
|
encodeKey(key: string): string;
|
|
|
|
encodeValue(value: string): string;
|
2016-06-28 14:31:35 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare enum ReadyState {
|
|
|
|
Unsent = 0,
|
|
|
|
Open = 1,
|
|
|
|
HeadersReceived = 2,
|
|
|
|
Loading = 3,
|
|
|
|
Done = 4,
|
2018-06-25 05:11:22 -04:00
|
|
|
Cancelled = 5
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-05-26 18:47:20 -04:00
|
|
|
export declare class Request extends Body {
|
2016-06-22 17:56:10 -04:00
|
|
|
headers: Headers;
|
2016-06-23 21:19:32 -04:00
|
|
|
method: RequestMethod;
|
2016-05-26 18:47:20 -04:00
|
|
|
responseType: ResponseContentType;
|
2016-06-22 17:56:10 -04:00
|
|
|
url: string;
|
|
|
|
withCredentials: boolean;
|
|
|
|
constructor(requestOptions: RequestArgs);
|
|
|
|
detectContentType(): ContentType;
|
2016-07-22 11:37:32 -04:00
|
|
|
detectContentTypeFromBody(): ContentType;
|
2016-06-22 17:56:10 -04:00
|
|
|
getBody(): any;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare enum RequestMethod {
|
|
|
|
Get = 0,
|
|
|
|
Post = 1,
|
|
|
|
Put = 2,
|
|
|
|
Delete = 3,
|
|
|
|
Options = 4,
|
|
|
|
Head = 5,
|
2018-06-25 05:11:22 -04:00
|
|
|
Patch = 6
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RequestOptions {
|
|
|
|
body: any;
|
2017-04-17 14:12:53 -04:00
|
|
|
headers: Headers | null;
|
|
|
|
method: RequestMethod | string | null;
|
2016-12-09 18:38:29 -05:00
|
|
|
params: URLSearchParams;
|
2017-04-17 14:12:53 -04:00
|
|
|
responseType: ResponseContentType | null;
|
2019-11-09 13:36:22 -05:00
|
|
|
/** @deprecated */ get search(): URLSearchParams;
|
2020-01-24 13:55:39 -05:00
|
|
|
/** @deprecated */ set search(params: URLSearchParams);
|
2017-04-17 14:12:53 -04:00
|
|
|
url: string | null;
|
|
|
|
withCredentials: boolean | null;
|
2017-06-06 18:58:38 -04:00
|
|
|
constructor(opts?: RequestOptionsArgs);
|
2016-06-22 17:56:10 -04:00
|
|
|
merge(options?: RequestOptionsArgs): RequestOptions;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface RequestOptionsArgs {
|
2016-06-23 21:19:32 -04:00
|
|
|
body?: any;
|
2017-04-17 14:12:53 -04:00
|
|
|
headers?: Headers | null;
|
|
|
|
method?: string | RequestMethod | null;
|
2016-12-09 18:38:29 -05:00
|
|
|
params?: string | URLSearchParams | {
|
|
|
|
[key: string]: any | any[];
|
2017-04-17 14:12:53 -04:00
|
|
|
} | null;
|
|
|
|
responseType?: ResponseContentType | null;
|
2016-12-09 18:38:29 -05:00
|
|
|
/** @deprecated */ search?: string | URLSearchParams | {
|
|
|
|
[key: string]: any | any[];
|
2017-04-17 14:12:53 -04:00
|
|
|
} | null;
|
|
|
|
url?: string | null;
|
|
|
|
withCredentials?: boolean | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-05-26 18:47:20 -04:00
|
|
|
export declare class Response extends Body {
|
2016-06-23 21:19:32 -04:00
|
|
|
bytesLoaded: number;
|
2017-04-17 14:12:53 -04:00
|
|
|
headers: Headers | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
ok: boolean;
|
|
|
|
status: number;
|
2017-04-17 14:12:53 -04:00
|
|
|
statusText: string | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
totalBytes: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
type: ResponseType;
|
|
|
|
url: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(responseOptions: ResponseOptions);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-05-26 18:47:20 -04:00
|
|
|
export declare enum ResponseContentType {
|
2016-07-21 16:44:38 -04:00
|
|
|
Text = 0,
|
2016-05-26 18:47:20 -04:00
|
|
|
Json = 1,
|
2016-07-21 16:44:38 -04:00
|
|
|
ArrayBuffer = 2,
|
2018-06-25 05:11:22 -04:00
|
|
|
Blob = 3
|
2016-05-26 18:47:20 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ResponseOptions {
|
2017-04-17 14:12:53 -04:00
|
|
|
body: string | Object | ArrayBuffer | Blob | null;
|
|
|
|
headers: Headers | null;
|
|
|
|
status: number | null;
|
|
|
|
url: string | null;
|
2017-06-06 18:58:38 -04:00
|
|
|
constructor(opts?: ResponseOptionsArgs);
|
2016-06-22 17:56:10 -04:00
|
|
|
merge(options?: ResponseOptionsArgs): ResponseOptions;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2017-03-15 18:28:52 -04:00
|
|
|
export interface ResponseOptionsArgs {
|
2017-04-17 14:12:53 -04:00
|
|
|
body?: string | Object | FormData | ArrayBuffer | Blob | null;
|
|
|
|
headers?: Headers | null;
|
|
|
|
status?: number | null;
|
|
|
|
statusText?: string | null;
|
|
|
|
type?: ResponseType | null;
|
|
|
|
url?: string | null;
|
2017-03-15 18:28:52 -04:00
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare enum ResponseType {
|
|
|
|
Basic = 0,
|
|
|
|
Cors = 1,
|
|
|
|
Default = 2,
|
|
|
|
Error = 3,
|
2018-06-25 05:11:22 -04:00
|
|
|
Opaque = 4
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class URLSearchParams {
|
|
|
|
paramsMap: Map<string, string[]>;
|
2016-06-23 21:19:32 -04:00
|
|
|
rawParams: string;
|
2016-06-28 14:31:35 -04:00
|
|
|
constructor(rawParams?: string, queryEncoder?: QueryEncoder);
|
2016-06-23 21:19:32 -04:00
|
|
|
append(param: string, val: string): void;
|
|
|
|
appendAll(searchParams: URLSearchParams): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
clone(): URLSearchParams;
|
2016-06-23 21:19:32 -04:00
|
|
|
delete(param: string): void;
|
2017-04-17 14:12:53 -04:00
|
|
|
get(param: string): string | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
getAll(param: string): string[];
|
2016-06-23 21:19:32 -04:00
|
|
|
has(param: string): boolean;
|
|
|
|
replaceAll(searchParams: URLSearchParams): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
set(param: string, val: string): void;
|
|
|
|
setAll(searchParams: URLSearchParams): void;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-11-30 16:52:08 -05:00
|
|
|
export declare const VERSION: Version;
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class XHRBackend implements ConnectionBackend {
|
|
|
|
constructor(_browserXHR: BrowserXhr, _baseResponseOptions: ResponseOptions, _xsrfStrategy: XSRFStrategy);
|
|
|
|
createConnection(request: Request): XHRConnection;
|
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class XHRConnection implements Connection {
|
2016-06-23 21:19:32 -04:00
|
|
|
readyState: ReadyState;
|
2016-06-22 17:56:10 -04:00
|
|
|
request: Request;
|
|
|
|
response: Observable<Response>;
|
|
|
|
constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions);
|
2018-06-25 05:11:22 -04:00
|
|
|
setDetectedContentType(req: any /** TODO Request */, _xhr: any /** XMLHttpRequest */): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 13:29:35 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class XSRFStrategy {
|
|
|
|
abstract configureRequest(req: Request): void;
|
|
|
|
}
|