Open ThibaultJanBeyer opened 6 years ago
Most implementations of DELETE I have seen just confirm the operation, they don't return data. Therefore it is a more useful default.
Most, but not all. Some DELETE
calls return a confirmation that is used to check against from client side. And since we are in a JsonRest store it makes sense to parse it as json
, right?
Or are you saying it would have negative side effects when there is a handleAs: "json"
and the call does not return data?
I think there's no clear right answer here. It would be fine to add as an opt-in configuration option, but I don't think we should change the default behavior at this point in time. If there's interest in creating a PR to support this, we would consider it for 1.15.
Hi dojo team and thanks for creating this feature rich library.
I saw a little something while using the JsonRest store that could probably be aligned easily:
Query
,Add
,Put
&Get
calls all usexhr
calls that have the optionhandleAs: "json"
set. ButDELETE
does not handle the response asjson
. Which causes the behavior to differ from expectation.So, please tell me, is that wanted or is it just by mistake?
Do you consider adding the handling for
DELETE
calls asjson
like all other calls a valid Pull Request? If so, I would be happy to contribute by creating one.