我在互联网上找到了一个json数据,我的应用程序正在运行,但是当我将相同的json数据复制到我的主机时。它不起作用。 一切都是一样的只是链接是不同的。你能帮帮我吗?
这是有效的
state = { data: [] };
componentWillMount() {
axios.get('https://rallycoding.herokuapp.com/api/music_albums')
.then(response => this.setState({ data: response.data }));
}
这不起作用
state = { data: [] };
componentWillMount() {
axios.get('http://ozandikbas.com/sendingdata2')
.then(response => this.setState({ data: response.data }));
}