Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Build Your First Vue.js App > 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...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

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

  • RSS
  • |
  • Atom