@3kles/3kles-corebe
Version:
3KLES Core BackEnd
23 lines (22 loc) • 825 B
TypeScript
import { IGenericAPI } from './IGenericAPI';
import { IHttpOptions, IParserResponse } from '../utils/index.utils';
export declare class HttpApi implements IGenericAPI {
protected protocol: string;
protected responseParser: IParserResponse;
protected errorParser: IParserResponse;
constructor(protocol?: string);
buildRequest(params: IHttpOptions, originDataRequest?: any, data?: string): any;
executeRequest(options: any, requestOption?: {
signal?: AbortSignal;
}): Promise<{
statusCode: number;
headers: any;
body: any;
}>;
processResponse(response: any): any;
processError(error: any): any;
beforeExecute(): void;
afterExecute(): void;
setResponseParser(parser: IParserResponse): void;
setErrorParser(parser: IParserResponse): void;
}