- From: Ailleen Lien <alien@clientsoft.com>
- Date: Tue, 19 Dec 2000 08:58:27 -0500
- To: www-lib@w3.org
-----Original Message-----
From: Jürgen Bernhardt [mailto:na1280@fen-net.de]
Sent: Tuesday, December 19, 2000 2:30 AM
To: Worik Turei Stanton
Cc: www-lib@w3.org
Subject: Re: HELP: posting data and get the result into a chunk??
>> 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
Hi Worik!
I also study the sample of postform.c. But there is an essential difference
between postform.c and post.c:
In postform.c you can post data like an HTML form tag, using
HTPostFormAnchorToChunk().
What I want to do is to post the whole data stream to a http server.
Compared
to HTPostFormAnchorToChunk(), I looked for a function like
HTPostAnchorToChunk(),
but there is no support in the wwwlib :-(
Cheers,
Juergen
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *
----------------------------------------------------------------------------
------
I wrote my version of HTPostAnchorToChunk(). But I am in testing to see I
get the result back
correcly from my server.
PUBLIC HTChunk * HTPostAnchorToChunk (HTParentAnchor * source,
HTAnchor * destination,
HTRequest * request)
{
if (source && destination && request) {
HTChunk * chunk = NULL;
HTStream * target = HTStreamToChunk(request, &chunk, 0);
HTRequest_setOutputStream(request, target);
if (HTPostAnchor(source, destination, request) != NULL)
return chunk;
else {
HTChunk_delete(chunk);
return NULL;
}
}
return NULL;
}
Received on Tuesday, 19 December 2000 08:58:42 UTC