happstack-helpers-0.52: Convenience functions for Happstack.

Happstack.Helpers.Redirect

Synopsis

Documentation

redirectPath :: MonadIO m => WebT m Response -> String -> Request -> WebT m ResponseSource

redirectPath def path rq = ...

eg, redirectPath (fail horribly) pathtopage" will redirect to http:myserver.compathtopage or http:localhost:5001pathto/page depending on whether it is servin in online environemnt or for local development on port 5001 Could produce an error if the hostname can't be determined for some reason (malformed headers?)

redirectToUrl :: MonadIO m => String -> WebT m ResponseSource

Escape a serverPartT handler by redirecting somewhere

Basically a wrapper around supplied seeOther function, which doesn't quite do what I want