1//Install Axios from terminal
2npm install axios
3//Import Axios in your HelloWorld.vue
4import axios from 'axios'
5//Add a method to implement Axios
6test () {
7 axios.post('URL')
8 .then(function (response) {
9 alert (response.data);
10 })
11 .catch(function (error) {
12 alert(error);
13 });
14 }
1<ul>
2 <li v-for="food in foods">
3 <h2>{{food.name}}</h2>
4 <ul>
5 <li v-for="nutrient in food.nutrients">{{nutrient.nutrient_id}}</li>
6 </ul>
7 </li>
8</ul>
9
10
11axios.get(url).then(response => {
12 this.foods = response.data.report.foods
13})