net::ERR_ABORTED 405 (Method Not Allowed)

  http, javascript, laravel

I’m able to do the delete method, but I’m getting 405 (Method Not Allowed) error, any idea on how to handle this error? The API was made with laravel

 async deletaPessoa() {
            await fetch("http://127.0.0.1:8000/api/pessoas/" + this.idPessoa, {
                method: "delete",
                headers: {
                    "Content-type": "application/json"
                },
            })
        }

(The command works fine, but I get this message)
error

Source: Laravel

Leave a Reply