diff --git a/lib/Web/Hikaru/Action.hs b/lib/Web/Hikaru/Action.hs index 7fa6ff011e4c33e805351a514c02d8c6a0b7ed0a..1a3ae899632b71f4f8fc4eb8aafdeec06ee35700 100644 --- a/lib/Web/Hikaru/Action.hs +++ b/lib/Web/Hikaru/Action.hs @@ -334,6 +334,9 @@ where getPathInfo = pathInfo <$> getRequest + -- | + -- Obtain request path as an unsplit 'Text'. + -- getPathInfoRaw :: (MonadAction m) => m Text getPathInfoRaw = cs <$> rawPathInfo <$> getRequest @@ -976,6 +979,10 @@ where -- Finalizing -------------------------------------------------------------- + -- | + -- Register an IO action to run once the request is either handler + -- or fails with an error. + -- registerFinalizer :: (MonadAction m) => IO a -> m () registerFinalizer fin = do modifyActionField aeFinalize (fin >>)