[Vuejs]-Print data from axios

0👍

axios call async call so make a promise call .then() after fetching data it will call and you can make usable the fetched data.

import axios from "axios";
const API_URL = "http://192.168.1.26:8000";

export class BaseStatus_Service {
    getBaseStatus_list() {
        const url = `${API_URL}/api/baf1/baseStatus`;
        return axios.get(url).then(response => response.data);
    }

const serviceUtil = new BaseStatus_Service();
serviceUtil.getBaseStatus_list().then((results)=>{
      console.log(results);
})

Leave a comment