Mercurial > urweb
comparison tests/headers.ur @ 1465:2f5fd248588d
getHeader and setHeader
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 29 May 2011 14:29:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1464:969b90b1f2f9 | 1465:2f5fd248588d |
---|---|
1 fun action () = | |
2 setHeader (blessResponseHeader "Location") "http://www.google.com/"; | |
3 return <xml/> | |
4 | |
5 fun main () = | |
6 ag <- getHeader (blessRequestHeader "User-Agent"); | |
7 return <xml><body> | |
8 User agent: {[ag]} | |
9 | |
10 <form> <submit action={action}/> </form> | |
11 </body></xml> |