[Ur] Handling POST requests that aren't from forms
Adam Chlipala
adamc at impredicative.com
Wed Dec 15 08:57:15 EST 2010
Chris Double wrote:
> On Thu, Dec 16, 2010 at 2:48 AM, Adam Chlipala<adamc at impredicative.com> wrote:
>
>> There may be a good way of supporting externally-callable forms without this
>> sort of acrobatics, but, for now, this method isn't so bad.
>>
> Thanks cor that, I'll try it. One issue might be the data posted is
> form data. It's not name=value pairs. It's 'application/json'.
> Basically string of JSON text. I was hoping to get the string and use
> the JSON routines you've made available to parse it. If I use a
> workaround of a dummy form in a function will 'notifyMessage' then
> expect form data?
>
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).
More information about the Ur
mailing list