UNPKG

895 BTypeScriptView Raw
1import { Operation } from "../core";
2import { Observer } from "../../utilities";
3export declare type ServerParseError = Error & {
4 response: Response;
5 statusCode: number;
6 bodyText: string;
7};
8export declare function readMultipartBody<T = Record<string, unknown>>(response: Response, observer: Observer<T>): Promise<void>;
9export declare function parseHeaders(headerText: string): Record<string, string>;
10export declare function parseJsonBody<T>(response: Response, bodyText: string): T;
11export declare function handleError(err: any, observer: Observer<any>): void;
12export declare function readJsonBody<T = Record<string, unknown>>(response: Response, operation: Operation, observer: Observer<T>): void;
13export declare function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise<any>;
14//# sourceMappingURL=parseAndCheckHttpResponse.d.ts.map
\No newline at end of file