diff tests/reqheader.ur @ 456:1a4fa157fedd

Monoizing FFI transactions correctly
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 09:21:34 -0500
parents
children 360cbc202756
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reqheader.ur	Thu Nov 06 09:21:34 2008 -0500
@@ -0,0 +1,5 @@
+fun main () : transaction page =
+    ua <- requestHeader "UserAgent";
+    case ua of
+        None => return <xml>Not found</xml>
+      | Some s => return <xml>UserAgent: {[s]}</xml>