Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Latest commit

 

History

History
18 lines (12 loc) · 795 Bytes

$fetch.md

File metadata and controls

18 lines (12 loc) · 795 Bytes
title description
$fetch
Nuxt uses ofetch to expose globally the $fetch helper for making HTTP requests.

$fetch

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

::ReadMore{link="/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.

::NeedContribution ::