'403 Forbidden Error: What It Is and How to Fix It
I am trying to access my page from the web browser. Then suddenly, the webserver is starting to show me the failed to load resource: the server responded with a status of 403 (forbidden) error. Isn’t it frustrating to experience this? I am all excited and the energy is getting wasted. But How can I recover the error?
const handleDelete = (id) => {
const proceed = window.confirm('Are you sure?');
if(proceed){
const url = `https://blooming-lowlands-86443.herokuapp.com/perfume/${id}`;
fetch(url, {
method: 'DELETE'
})
.then(res => res.json())
.then(data => {
const remaining = myPerfume.filter(perfume => perfume._id !== id);
setMyPerfume(remaining);
})
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
