Return JSON from yesod handler

旧时模样 提交于 2019-12-04 03:45:33
Mark B.

I got caught by this one too: you just have to change your type signature and it will work:

getEchoR :: String -> Handler Value

My understanding is that the whole Rep system is deprecated in Yesod 1.2, so Handler's now return Html and Value rather than RepHtml and RepJson.

Hope this helps!

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