view 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
line wrap: on
line source
cookie c : string

fun main () : transaction page =
    setCookie c "Hi";
    so <- getCookie c;
    case so of
        None => return <xml>No cookie</xml>
      | Some s => return <xml>Cookie: {[s]}</xml>