import { AxiosConfigCallback, httpGet, httpPost, httpPostJson } from "./http"; export class Http { public config?: AxiosConfigCallback constructor(config?: AxiosConfigCallback) { this.config = config } public httpGet(url: string, data?: V, config?: AxiosConfigCallback) { const axiosConfig = config ? config : this.config return httpGet(url, data, axiosConfig) } public httpPost(url: string, data?: V, params?: any, config?: AxiosConfigCallback) { const axiosConfig = config ? config : this.config return httpPost(url, data, params, axiosConfig) } public httpPostJson(url: string, data?: V, params?: any, config?: AxiosConfigCallback) { const axiosConfig = config ? config : this.config return httpPostJson(url, data, params, axiosConfig) } } export const httpAxiosRequest = (config?: AxiosConfigCallback): Http => { return new Http(config) }