i'm doing a project and using json-server
and axios.js
, but i am with problem in the method delete
.
My 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)
})
}
The route http://127.0.0.1:3000/people
is of the json.server
..
And the error :
Failed to load resource: the server responded with a status of 404 (Not Found)
Someone would can help me ?