In this lesson, you’ll learn how to do basic data fetching with $fetch from ofetch. You’ll fetch the mocked AI response from the server route you created in the previous lesson.
In future lessons we’ll see how we can use useFetch and useAsyncData to give us some extra benefits that $fetch doesn’t do for us.
$fetch: https://nuxt.com/docs/api/utils/dollarfetch
ofetch ($fetch): https://github.com/unjs/ofetch
3 lessons
10 lessons
14 lessons
12 lessons
13 lessons
10 lessons
9 lessons
9 lessons
5 lessons
6 lessons
5 lessons
8 lessons
8 lessons