Is there a simple way to generate a link that uses a different method than GET in Yesod, such as in Ruby on Rails, where one can do link_to foo, bar, method: "post", which would submit the link via JavaScript?
update: What Ruby on Rails does is that it generates a data-method attribute, which is then handled by its own JavaScript library. I'm not necessarily looking for exactly the same solution, but rather if there is an existing mechanism for creating POST links in Yesod.
Is there a simple way to generate a link that uses a different method than GET in Yesod
Not that I'm aware of.
an existing mechanism for creating POST links in Yesod
To generate POST links specifically, you could render a form styled to look like a link. You could probably wrap this up in a postLink :: Route -> Widget helper.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With