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.
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=".
Click to load comments...