© 2026 Hedgehog Software, LLC
useFetch
<script setup> const { data } = useCustomFetch('/some-route'} </script>
export const useCustomFetch = async (endpoint: string) { const baseURL = useRuntimeConfig().public.baseUrl const headers = useRequestHeaders(['cookie']) const { data, error, refresh } = await useFetch(endpoint, { baseURL, headers, }) return { data, error, refresh, } }
credentials: 'include'