Nuxt/docs/content/3.api/3.utils/$fetch.md
Clément Ollivier 944bba97ca
docs: update structure (#7047)
Co-authored-by: Pooya Parsa <pooya@pi0.io>
2022-09-13 14:54:31 +02:00

683 B

$fetch

::ReadMore{link="/getting-started/data-fetching"} ::

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

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 ::