W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2000

Re: HELP: posting data and get the result into a chunk??

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
Message-ID: <87ofyakbwk.fsf@noggon.co.nz>
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));

    /* We are done with this request */

    /* Terminate libwww */


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 Macky Turei Stanton
     This line would have seven words if only it had six words less.
Received on Sunday, 17 December 2000 15:53:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:53 UTC