summaryrefslogtreecommitdiff
path: root/tests/cookieClear.ur
blob: 70829808d3b6ac1e30db586db5d265de186a5501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cookie c : int

fun setit () =
    setCookie c {Value = 13,
                 Expires = None,
                 Secure = False};
    return <xml/>

fun doit () =
    ro <- getCookie c;
    clearCookie c;
    case ro of
      None => return <xml>None</xml>
    | Some v => return <xml>Some {[v]}</xml>

fun main () = return <xml><body>
  <form><submit value="Set it!" action={setit}/></form>
  <form><submit value="Get busy!" action={doit}/></form>
</body></xml>