UNPKG

@crediblex.io/fineract-api-client

Version:
29 lines 1.25 kB
import { AxiosResponse } from "axios"; export interface HttpClientConfig { baseURL: string; tenantId?: string; username?: string; password?: string; timeout?: number; } /** * HttpClient is a wrapper around the Axios library that provides a more * user-friendly interface for making HTTP requests. * * It handles the configuration of headers, authentication, and request * * @remarks * This class is not intended to be used directly. It is used internally by the Fineract API client. */ export declare class HttpClient { private readonly axiosInstance; private readonly tenantId?; constructor(config: HttpClientConfig); private transformError; request<T>(method: string, url: string, data?: any, params?: any, headers?: Record<string, string>): Promise<AxiosResponse<T>>; get<T>(url: string, params?: any, headers?: Record<string, string>): Promise<AxiosResponse<T>>; post<T>(url: string, data?: any, headers?: Record<string, string>): Promise<AxiosResponse<T>>; put<T>(url: string, data?: any, headers?: Record<string, string>): Promise<AxiosResponse<T>>; delete<T>(url: string, headers?: Record<string, string>): Promise<AxiosResponse<T>>; } //# sourceMappingURL=http-client.d.ts.map