Mercurial > urweb
comparison tests/cookie.ur @ 462:21bb5bbba2e9
Setting a cookie
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Nov 2008 11:29:16 -0500 |
parents | f542bc3133dc |
children | bb27c7efcd90 |
comparison
equal
deleted
inserted
replaced
461:5c9606deacb6 | 462:21bb5bbba2e9 |
---|---|
1 cookie c : string | 1 cookie c : string |
2 | 2 |
3 fun main () : transaction page = | 3 fun main () : transaction page = |
4 setCookie c "Hi"; | 4 setCookie c "Hi"; |
5 so <- getCookie c; | 5 so <- requestHeader "Cookie"; |
6 case so of | 6 case so of |
7 None => return <xml>No cookie</xml> | 7 None => return <xml>No cookie</xml> |
8 | Some s => return <xml>Cookie: {[s]}</xml> | 8 | Some s => return <xml>Cookie: {[s]}</xml> |
9 |