Below is a quick set of examples to show how to send HTTP GET requests from Vue to a backend API using fetch() which comes bundled with all modern browsers.
Simple GET request using fetch
This sends an HTTP GET request from Vue to the npm api to search for all vue packages using the query q=vue, then assigns the total returned in the response to the component data property totalVuePackages so it can be displayed in the component template.
GET request using fetch with async/await
This sends the same GET request from Vue using fetch, but this version uses an async function and the await javascript expression to wait for the promises to return (instead of using the promise then() method as above).

#vue #vuejs

Vue + Fetch - HTTP GET Request Examples
1.95 GEEK