RC
RC
  • Get Started
  • Guide
  • API
  • Examples
  • Community
    • useAppConfig
    • useAsyncData
    • useCookie
    • useError
    • useFetch
    • useHead
    • useHydration
    • useLazyAsyncData
    • useLazyFetch
    • useNuxtApp
    • useRequestEvent
    • useRequestHeaders
    • useRoute
    • useRouter
    • useRuntimeConfig
    • useState
    • <NuxtPage>
    • <NuxtLayout>
    • <NuxtLink>
    • <NuxtLoadingIndicator>
    • <NuxtErrorBoundary>
    • <NuxtWelcome>
    • <Teleport>
    • $fetch
    • abortNavigation
    • addRouteMiddleware
    • clearError
    • clearNuxtData
    • createError
    • defineNuxtComponent
    • defineNuxtRouteMiddleware
    • definePageMeta
    • navigateTo
    • prefetchComponents
    • preloadComponents
    • refreshNuxtData
    • setPageLayout
    • setResponseStatus
    • showError
    • updateAppConfig
    • Lifecycle Hooks
    • Kit Utilities
    • nuxi add
    • nuxi analyze
    • nuxi build
    • nuxi cleanup
    • nuxi dev
    • nuxi generate
    • nuxi info
    • nuxi init
    • nuxi prepare
    • nuxi preview
    • nuxi typecheck
    • nuxi upgrade
    • Nuxt Config

$fetch

Nuxt uses ohmyfetch to expose globally the $fetch helper for making HTTP requests within your Vue app or API routes.

Read more in Getting Started > Data Fetching.

During server-side rendering, calling $fetch to fetch your internal API routes will directly call the relevant function (emulating the request), saving an additional API call.

Note that $fetch is the preferred way to make HTTP calls in Nuxt 3 instead of @nuxt/http and @nuxtjs/axios that are made for Nuxt 2.

Documentation for this section is not yet complete. You can contribute to the documentation.

Components

<Teleport>

Utils

abortNavigation