import axios from 'axios' axios.defaults.withCredentials = true axios.defaults.baseURL = '/proxy' export const get = async (path: string, params: Q): Promise => { return axios .get(path, { params, }) .then(res => res.data) } export const post = async (path: string, params: Q): Promise => { return axios.post(path, params).then(res => res.data) }