Yesod uses the methodOverride middleware by default which allows this. When I use this approach, I just put it into the action
attribute of the form, e.g.:
<form method=post action=@{SomeRouteR}?_method=DELETE>
Question
Is there an easy way to have yesod read a POST request as a PUT or DELETE when it has a special parameter: _method=DELETE
? And render forms with it?
Solution
Yesod uses the methodOverride middleware by default which allows this. When I use this approach, I just put it into the action
attribute of the form, e.g.:
<form method=post action=@{SomeRouteR}?_method=DELETE>