Issues regarding DELETE method


im having issues on ubuntu 19.04 while trying to use the delete method:

$app->delete(’/hotels/’, function ($request, $response, $args) {

i get the infamous ->
Method not allowed. Must be one of: GET, PUT, POST

hen i test it with postman using the DELETE method,

tried changing the apache2.conf with no luck, the message is still there.
any help would be appreciated.

thanks in advance.

Hi @alfredogon82

The DELETE method works. I have testet it with postman.

Try to remove the last / from the route:

$app->delete('/hotels', function ($request, $response, $args) {


it works now perfectly :slight_smile:

1 Like