Fetch DELETE works when I test my web app on localhost - it successfully deletes all selected products from my SQL database. But when I publish web app on infinityfree it redirects me to infinityfree error “403 Forbidden” when using Fetch DELETE. At the same time Fetch GET and POST works fine on infinityfree.
Then how can I send DELETE request to my SQL database?
Should I send from Front End using POST request data in which there is a key word that indicates that I want to DELETE something in the database and then Back End has to catch this key word and execute the DELETE query?
What @wackyblackie said. And also because you cannot do other HTTP keywords without involving custom Javascript.
A POST or GET request can be made from a <form> HTML tag. A GET request is also performed when you open a URL from an <a> tag. But PUT/PATCH/DELETE cannot be done like that.