1 | export interface IODataParser<T> {
|
2 | hydrate?: (d: any) => T;
|
3 | parse(r: Response): Promise<T>;
|
4 | }
|
5 | export declare class ODataParser<T = any> implements IODataParser<T> {
|
6 | parse(r: Response): Promise<T>;
|
7 | protected parseImpl(r: Response, resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: Error) => void): void;
|
8 | |
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | protected handleError(r: Response, reject: (err?: Error) => void): boolean;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 | protected parseODataJSON<U>(json: any): U;
|
22 | }
|
23 | export declare class TextParser extends ODataParser<string> {
|
24 | protected parseImpl(r: Response, resolve: (value: any) => void): void;
|
25 | }
|
26 | export declare class BlobParser extends ODataParser<Blob> {
|
27 | protected parseImpl(r: Response, resolve: (value: any) => void): void;
|
28 | }
|
29 | export declare class JSONParser extends ODataParser<any> {
|
30 | protected parseImpl(r: Response, resolve: (value: any) => void): void;
|
31 | }
|
32 | export declare class BufferParser extends ODataParser<ArrayBuffer> {
|
33 | protected parseImpl(r: Response, resolve: (value: any) => void): void;
|
34 | }
|
35 | export declare class LambdaParser<T = any> extends ODataParser<T> {
|
36 | private parser;
|
37 | constructor(parser: (r: Response) => Promise<T>);
|
38 | protected parseImpl(r: Response, resolve: (value: any) => void): void;
|
39 | }
|
40 | export declare class HttpRequestError extends Error {
|
41 | response: Response;
|
42 | status: number;
|
43 | statusText: string;
|
44 | isHttpRequestError: boolean;
|
45 | constructor(message: string, response: Response, status?: number, statusText?: string);
|
46 | static init(r: Response): Promise<HttpRequestError>;
|
47 | }
|
48 | //# sourceMappingURL=parsers.d.ts.map |
\ | No newline at end of file |