Having Restangular's .remove send data in body vs URI

喜欢而已 提交于 2019-12-10 18:08:23

问题


I am in the process of converting my Angular REST calls to utilize Restangular. During this conversion I am simply moving the calls to use Restangular.one('controller').remove(object); This is calling the correct URI and method DELETE but is sending the object in the URI instead of the body. Is there an easy way to tell Restangular to send the object in the body? For POST/PUT I have utilized customPOST and customPUT which send the data in the body. Any pointers would be much appreciated.


回答1:


You can use customDELETE for that :).



来源:https://stackoverflow.com/questions/20643182/having-restangulars-remove-send-data-in-body-vs-uri

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!