Add warning about calling parseJsonBody twice

This commit is contained in:
Michael Snoyman 2013-09-08 16:52:56 +02:00
parent a3f004184e
commit 5b379067b2

View File

@ -84,6 +84,10 @@ provideJson = provideRep . return . J.toJSON
-- If you want the raw JSON value, just ask for a @'J.Result'
-- 'J.Value'@.
--
-- Note that this function will consume the request body. As such, calling it
-- twice will result in a parse error on the second call, since the request
-- body will no longer be available.
--
-- /Since: 0.3.0/
parseJsonBody :: (MonadHandler m, J.FromJSON a) => m (J.Result a)
parseJsonBody = do