Answer the question
In order to leave comments, you need to log in
Has been blocked by CORS policy: The 'Access-Control-Allow-Origin'?
there is an error but I don’t know how to fix it (I’m studying axios for 1 day)
I want to add data to the array,
here is the code
import axios from 'axios'
export default {
data() {
return {
results: []
}
},
mounted() {
axios.get('http://gallery.dev.webant.ru/api/photos?page=1').then( response => {
this.results = response.data
} )
},
}
Answer the question
In order to leave comments, you need to log in
Read about CORS . For now, the solution to the problem is to use jsonp .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question