'Amplify delete api call return Network error

I get this erreur: erreur: Error: Network Error from my del call. It did not even reach the backend! I try my call in postman and it's working. This is my code call:

try{
     await API.del('api',`/reservation/delete/${authStatus.getAuthenticatedUsername()}/${dateGoodFormat}`
                , {headers: {}})
        }
        catch (e) {
            console.log(`erreur: ${e}`)
        }

Any idea what i'm doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source