You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
I know this a similar issue has been closed, but I think it should be added. When I try to set a request body on a delete (array of JSON objects), it is put in the URL as a request params, instead of the request body.
Maybe a custom property could be added to $resource (under "options", say "enableDeleteRequestBody" in addition to already supported "stripTrailingSlashes"), with a warning in the doc that states that this is not the officially Spec-compliant use of a DELETE (use at your own risk).
But I would really like to use it.
It would allow for batch deletes of multiple, non-consecutive objects that represent, say, rows in a database. specifying those rowIds as, say, query string params in the URL, or request headers, is messy. Apache Jetty server is definitely accepting my DELETE body request that I send from POSTman.
The text was updated successfully, but these errors were encountered:
So, looking at #4280 the current behaviour is the intentional one. I guess that at the end of a day it boils down to a simple question: should DELETE request be allowed to have body or not. Last time I've checked both specs and backend impls weren't so clear about it :-/
Implying that the first parameter, parameters, is optional but this is inconsistent with DELETE methods. For DELETE methods, if only one argument is provided it will be sent as query parameters instead of the request body.
This is because the DELETE method is not considered to have a body.
By default, only `PUT`, `POST` and `PATCH` requests have a body, but you can use
`hasBody` to configure any action to either have or not have a body, regardless
of its HTTP method.
Fixes#10128Closes#12181
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I know this a similar issue has been closed, but I think it should be added. When I try to set a request body on a delete (array of JSON objects), it is put in the URL as a request params, instead of the request body.
Maybe a custom property could be added to $resource (under "options", say "enableDeleteRequestBody" in addition to already supported "stripTrailingSlashes"), with a warning in the doc that states that this is not the officially Spec-compliant use of a DELETE (use at your own risk).
But I would really like to use it.
It would allow for batch deletes of multiple, non-consecutive objects that represent, say, rows in a database. specifying those rowIds as, say, query string params in the URL, or request headers, is messy. Apache Jetty server is definitely accepting my DELETE body request that I send from POSTman.
The text was updated successfully, but these errors were encountered: