So this is my function, really simple:
mounted: function(){
this.$http.get('http://localhost:80/gaming/api/game/1').then((data)=>{
console.log(data.body);
});
}
My VueJS app runs on port 8080
, and my PHP runs on XAMPP on port 80
.
When I try to fetch something from my API I get the following error:
Uncaught (in promise) Response {url: "http://localhost:80/gaming/api/game/1", ok: false, status: 0, statusText: "", headers: Headers, …}
What can I do?