On Thu, Dec 16, 2010 at 2:57 AM, Adam Chlipala <[email protected]> wrote:
> No, this should be a form with no fields, and the beginning [notifyMessage]
> should be changed like:
> fun notifyMessage body () =
> so it expects an extra empty record of form fields (which doesn't affect the
> URL format).
This is what the post request looks like that I'm receving:
----------8<-------------
Content-Type: application/json
Content-Length: 19
{"message":"hello"}
----------8<-------------
The Ur/Web code I have is like:
----------8<-------------
fun notifyMessage () =
msg <- ...how do I get the value of the POST request body here...
...such that msg is the string "{\"message\":\"hello\"}"
dml (INSERT INTO debug (Message) VALUES ({[msg]}));
return <xml>0</xml>
fun dummyForm () =
return <xml>
<body>
<form >
<submit action={notifyMessage}/>
</form>
</body>
</xml>
----------8<-------------
Is it possible to get access to the original POST body in notifyMessage?
Chris.
--
http://www.bluishcoder.co.nz
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur