@platform/cell.client
Version:
A strongly typed HTTP client for operating with a CellOS service end-point.
15 lines (14 loc) • 721 B
TypeScript
import * as t from './types';
export declare function isOK(status?: number | string): boolean;
export declare function isObservable(input?: any): boolean;
export declare function fromHttpResponse(res: t.IHttpResponse): {
toClientResponse<T>(options?: {
bodyType?: "JSON" | "TEXT" | "BINARY" | undefined;
}): t.IHttpClientResponse<T>;
};
export declare function toClientResponse<T>(status: number, body: T, options?: {
bodyType?: t.HttpClientBodyType;
error?: t.IHttpError;
}): t.IHttpClientResponse<T>;
export declare function toError<T>(status: number, type: t.HttpError | t.FsHttpError, message: string, body?: T): t.IHttpClientResponse<T>;
export declare function isError(data?: any): boolean;