The RESTful flow?

前端 未结 8 1313
傲寒
傲寒 2021-01-16 06:34

So...

I\'ve been reading about REST a little bit, and the idea behind it sounds nice, but the question is, can it be easily integrated into the standard flow of a we

8条回答
  •  耶瑟儿~
    2021-01-16 07:12

    Don't overthink it. You're not going to be able to do this with straight HTML forms and a browser. They do not support DELETE method. Ajax can do it.

    I want to be able to DELETE to VIEW the contents of a particular post from one URL (by sending either DELETE, PUT, POST, or GET), not different URLs with additional params

    Delete to view? I'm not sure I understand it, but your delete should be done through the headers, not through the URL. The delete method should not return a view. REST is a service, not all requests are meant for visual consumption.

提交回复
热议问题