parseJsonBody_ deprecated for requireJsonBody

This commit is contained in:
Greg Weber 2014-03-11 18:07:46 -07:00
parent 8535f19583
commit 5c3078b51e

View File

@ -19,7 +19,7 @@ instance Yesod App
getHomeR :: Handler RepPlain
getHomeR = do
val <- parseJsonBody_
val <- requireJsonBody
case Map.lookup ("foo" :: Text) val of
Nothing -> invalidArgs ["foo not found"]
Just foo -> return $ RepPlain $ toContent (foo :: Text)