10 lines
255 B
TypeScript
10 lines
255 B
TypeScript
|
import axios from "axios";
|
||
|
|
||
|
export async function useAxios(path: string, options: any) {
|
||
|
const runtimeConfig = useRuntimeConfig();
|
||
|
return await axios(`${runtimeConfig.public.apiBaseUrl}${path}`, {
|
||
|
...options,
|
||
|
headers: options.headers,
|
||
|
});
|
||
|
}
|