comparison tests/redirect.ur @ 1065:217eb87dde31

Basis.url and redirects
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Dec 2009 13:32:09 -0500
parents
children
comparison
equal deleted inserted replaced
1064:b89e3d8731ed 1065:217eb87dde31
1 fun other () = redirect (bless "http://www.google.com/")
2
3 fun further () = case checkUrl "http://www.google.com/" of
4 None => return <xml>Darn.</xml>
5 | Some url => redirect url
6
7 fun failing () = case checkUrl "http://www.yahoo.com/" of
8 None => return <xml>Darn.</xml>
9 | Some url => redirect url
10
11 fun main () = return <xml><body>
12 <a link={other ()}>Go there</a><br/>
13 <a link={further ()}>Go also there</a><br/>
14 <a link={failing ()}>Fail there</a>
15 </body></xml>