Answer the question
In order to leave comments, you need to log in
Why is axios not working?
I am making VK mini apps, when I access a php script via axios I get a network error, but if I access a json file, then everything is ok. The piece of code below, when accessing JSON, returns everything fine, if I want to access the .php script, I get a network error.
componentDidMount() {
axios.get(url)
.then(res => {
const data = res.data;
console.log(res.data)
this.setState({ data });
})
}*/
class App extends React.Component {
...
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question