restangular icon indicating copy to clipboard operation
restangular copied to clipboard

Support DELETE method with body

Open markb-trustifi opened this issue 6 years ago • 0 comments

The Delete method supports body in Angular 7, window.fetch and XHR. I see no reason why it cannot be supported in Restangular out of the box without tricks with interceptors.

Please see the discussion in similar issue in angular repository: https://github.com/angular/angular/issues/19438#issuecomment-441511056

Conform RFC 8231 Sec 4.3.5: https://tools.ietf.org/html/rfc7231#section-4.3.5 "A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existing implementations to reject the request"

https://github.com/angular/angular/issues/19438#issuecomment-377609661

Angular is a medium, not the API itself. If the API doesn't forbid it, Angular shouldn't make the decision for the dev. If someone is developing full stack, they have sufficient control over the REST handling to properly handle DELETES with payload.

markb-trustifi avatar Jul 18 '19 10:07 markb-trustifi