我正在做一个项目并使用json-server
and axios.js
,但我的方法有问题delete
。
我的axios.js
:
remove = (id) => {
axios.delete('http://127.0.0.1:3000/people/', id)
.then(function(response) {
this.setState({
filtered: response
})
}).catch(function(error) {
console.log(error)
})
}
路线http://127.0.0.1:3000/people
是json.server
..
和错误:
加载资源失败:服务器响应状态为 404(未找到)
有人可以帮助我吗?