redirect and redirect'

7 views
Skip to first unread message

john....@gmail.com

unread,
Sep 24, 2017, 7:07:38 AM9/24/17
to haskell-wai
From https://hackage.haskell.org/package/wai-util-0.8/docs/Network-Wai-Util.html :

> redirect :: Status -> ResponseHeaders -> URI -> Maybe Response Source
> Smart constructor to build a redirect
> Checks if the Status is a redirection and the URI is absolute
> redirect' :: Monad m => Status -> ResponseHeaders -> URI -> m Response Source
> Smart constructor to build a redirect
> Asserts redirect conditions with an irrefutable pattern match, only use on hard-coded values.

What does "check" mean here? What happens if it fails the check? Why must the URI be absolute? Why is there second function ( redirect' ) ?

Michael Snoyman

unread,
Sep 27, 2017, 5:51:25 AM9/27/17
to john....@gmail.com, haskell-wai
I'm not sure if the author of that package reads this list. If you don't get a response, it may be worth following up directly (either via a Github issue or similar).

--
You received this message because you are subscribed to the Google Groups "haskell-wai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-wai+unsubscribe@googlegroups.com.
To post to this group, send email to haske...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-wai/592f8bce-9489-42cf-b7ba-9417bba4c008%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages