adamc@464: cookie c : {A : string, B : float, C : int} adamc@464: adamc@464: fun set r = adamc@1050: setCookie c {Value = {A = r.A, B = readError r.B, C = readError r.C}, adamc@1050: Expires = None, adamc@1050: Secure = False}; adamc@464: return Cookie set. adamc@464: adamc@1050: fun setExp r = adamc@1050: setCookie c {Value = {A = r.A, B = readError r.B, C = readError r.C}, adamc@1050: Expires = Some (readError "2012-11-6 00:00:00"), adamc@1050: Secure = False}; adamc@1050: return Cookie set robustly. adamc@1050: adamc@1050: fun delete () = adamc@1050: clearCookie c; adamc@1050: return Cookie cleared. adamc@1050: adamc@464: fun main () = adamc@464: ro <- getCookie c; adamc@465: return adamc@465: {case ro of adamc@465: None => No cookie set. adamc@1050: | Some v => adamc@1050: Cookie: A = {[v.A]}, B = {[v.B]}, C = {[v.C]}
adamc@1050:
adamc@1050:
} adamc@465:

adamc@464: adamc@465:
adamc@465: A:
adamc@465: B:
adamc@465: C:
adamc@465: adamc@1050:
adamc@1050: adamc@1050:
adamc@1050: Version that expires on November 6, 2012:
adamc@1050: A:
adamc@1050: B:
adamc@1050: C:
adamc@1050: adamc@465: adamc@465: