const requestFetch = useRequestFetch()
const postResponse = async (
endpoint: string,
body?: object,
) => {
const response = await requestFetch(endpoint, {
baseURL: config.public.domain,
method: HTTP_METHOD_POST,
body,
})
return response
}
const { data, error } = await useAsyncData(async () => await postResponse('/api/refresh-token'))
const requestFetch = useRequestFetch()
const postResponse = async (
endpoint: string,
body?: object,
) => {
const response = await requestFetch(endpoint, {
baseURL: config.public.domain,
method: HTTP_METHOD_POST,
body,
})
return response
}
const { data, error } = await useAsyncData(async () => await postResponse('/api/refresh-token'))