My current project is built on Vue.js and I am using Flask for the API. The issue arises when trying to make an axios.get request - the API returns an object 'Object'. Interestingly, when testing the same request in Postman, it works fine and returns the expected data.
Below is a snippet of my code:
<script>
import axios from 'axios'
const URL = 'http://localhost:8080/'
mounted(){
axios.get(URL + "/KPI/get_category/1").then(response=>{
for (const data in response.data) {
this.kalite.push(JSON.parse(JSON.stringify(response.data[data])))
}
for(const data in this.kalite){
axios.get(URL + "/KPI/get_last_input/"+this.kalite[data]
['id']).then(response=>{
console.log("response " + response)
})
}
})
}
</script>
Upon checking the console, I see the following message: response [object Object]