Mercurial > urweb
comparison tests/cookie.ur @ 463:bb27c7efcd90
Reading cookies works
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Nov 2008 12:08:41 -0500 |
parents | 21bb5bbba2e9 |
children | 1626dcba13ee |
comparison
equal
deleted
inserted
replaced
462:21bb5bbba2e9 | 463:bb27c7efcd90 |
---|---|
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 <- requestHeader "Cookie"; | 5 so <- getCookie c; |
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> |