Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Discord About
The video for this lesson is currently being updated, please read the transcript instead.
Vue Foundations > Lesson 27

Using AJAX in Vue

Now that we understand how the API works, let's now go ahead and make an AJAX call to retrieve some proper poster objects.

GET request

In the onSubmit function, we're now going to use the Fetch API to make a GET request to the API.

So let's delete the console log and instead call fetch. The first argument to is the resource we want to query which will be "/search".

However, you'll recall that we need to supply a query to this endpoint as well. So let's make it "/search?q=".


Back to course page

Click to load comments...

Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom