In REST API, can DELETE methods have parameters?

There’s nothing wrong with using DELETE on a collection and filtering by query parameters. Neither the REST dissertation nor the HTTP spec say anything about not doing this.

This is different than the answer to the question that @Thilo linked to because the circumstances are different. That question was about including a “no, really, delete it!” query parameter, which is inappropriate. You’re using the query parameter to filter the results which should be deleted.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)