import { Base_URL } from "../../app.config"; import { createRequest } from "./create"; import { token } from "../logic"; const Instance = createRequest({ baseURL: Base_URL, token: token }) export default Instance; export function Get(url: string, config?: Omit, 'url' | 'method' | 'data'>) { return Instance({ ...config, url, method: 'GET' }) } export function Post(url: string, data?: IRequestConfig['data'], config?: Omit, 'url' | 'method' | 'data'>) { return Instance({ ...config, url, method: 'POST', data }) }