- From: Worik Turei Stanton <worik@noggon.co.nz>
- Date: 18 Dec 2000 09:53:15 +1300
- To: Juergen Bernhardt <Juergen.Bernhardt@fen-net.de>
- Cc: www-lib@w3.org
Juergen Bernhardt <Juergen.Bernhardt@fen-net.de> writes:
> Hi all!
>
> I looked at the sample code of the w3c library for the usage of
> posting data. I found 'post.c'. This sample posts data to a server
> and store the result into a local file.
>
> My question is how can I get the data back into a chunk and not in a
> file?
I have been wondering this too.
I have found what looks like the answer in ostform.c
PRIVATE int terminate_handler (HTRequest * request, HTResponse * response,
void * param, int status)
{
/* resut is a global
returned by HTPostFormAnchorToChunk
*/
if (status == HT_LOADED && result && HTChunk_data(result)) {
HTPrint("%s", HTChunk_data(result));
HTChunk_delete(result);
}
/* We are done with this request */
HTRequest_delete(request);
/* Terminate libwww */
HTProfile_delete();
exit(0);
}
I have not had time to try this yet
I wonder about the comment when the terminate_handler is added. What
does it mean 'update the history list'?
/* Add our own filter to update the history list */
HTNet_addAfter(terminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);
>
> Does anyone have a modified 'post.c' sample which shows this redirection
> into a chunk?
>
> Thanks in advance for any notes!
>
> Cheers,
> Juergen
> --
> Juergen Bernhardt
> Mail: Juergen.Bernhardt@fen-net.de
> WWW: http://www.fen-net.de/juergen.bernhardt
>
Worik
>
>
>
--
Worik Macky Turei Stanton
worik@noggon.co.nz
Aotearoa
This line would have seven words if only it had six words less.
Received on Sunday, 17 December 2000 15:53:11 UTC