[Klone-users] Create request
Mickael Auger
mickael.auger at gmail.com
Tue May 26 03:39:05 EDT 2009
Hi Thomas,
do you have a function to get raw data (without header) to print directly ?
Thanks.
2009/5/25 Mickael Auger <mickael.auger at gmail.com>
> Great thanks :)
>
> I think that a function like "print_postargs" existed.
>
> Bye.
>
> 2009/5/25 thomas fossati <tho at koanlogic.com>
>
> Hi Mickael,
>>
>> On May 25, 2009, at 5:24 PM, Mickael Auger wrote:
>>
>>> But today, I wish get all POST data to print directly without parse them
>>> and without know their name or their value.
>>>
>>> Do you have a function to get all POST data and convert to a string,
>>> please ?
>>>
>>
>>
>> you have to create a formatter for your name/value pairs and supply it to
>> the vars_foreach function, like the following:
>>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> <%!
>> int postargs_fmt (var_t *v, void *dummy)
>> {
>> io_printf(out, "<p>%s = %s</p>", var_get_name(v),
>> var_get_value(v));
>> return 0;
>> }
>> %>
>> <html>
>> <head><title>test POST args fmt</title></head>
>> <body>
>>
>> <%
>> vars_foreach(request_get_postargs(request), postargs_fmt, NULL);
>> %>
>>
>> </body>
>> </html>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>
>> ciao, t.
>>
>> _______________________________________________
>> Klone-users mailing list
>> Klone-users at koanlogic.com
>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>
>
>
>
> --
> Mickaël AUGER
>
>
--
Mickaël AUGER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20090526/1ce48de9/attachment.htm
More information about the klone-users
mailing list