This lesson is for members. Join us?
Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.
Another Use Case for $fetch - in API Endpoints
In this lesson, we take a look at one more use case for $fetch , that is for making HTTP requests from a Nuxt API endpoint defined in server/api. You should NOT use useFetch or useAsyncData within your own Nuxt API endpoints but only $fetch. useFetch and useAsyncData should be reserved for use within composables and components.
Links
- Chapter 1
