UNPKG

@pgchain/blockchain-libs

Version:
13 lines (12 loc) 610 B
declare class RestfulRequest { readonly baseUrl: string; readonly timeout: number; readonly headers: Record<string, string>; constructor(baseUrl: string, headers?: Record<string, string>, timeout?: number); private static handleResponse; get(path: string, params?: Record<string, any>, headers?: Record<string, string>, timeout?: number): Promise<Response>; post(path: string, data?: Record<string, any> | string, json?: boolean, headers?: Record<string, string>, timeout?: number): Promise<Response>; private buildUrl; private assembleHeaders; } export { RestfulRequest };