Mercurial > urweb
annotate 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 |
rev | line source |
---|---|
adamc@459 | 1 cookie c : string |
adamc@459 | 2 |
adamc@459 | 3 fun main () : transaction page = |
adamc@459 | 4 setCookie c "Hi"; |
adamc@462 | 5 so <- requestHeader "Cookie"; |
adamc@459 | 6 case so of |
adamc@459 | 7 None => return <xml>No cookie</xml> |
adamc@459 | 8 | Some s => return <xml>Cookie: {[s]}</xml> |