Can anyone produce an HTPostAnchorToChunk that works?

Carl Daniel <[email protected]>
Newsgroups gmane.comp.lib.libwww
Message-ID <014601c23fc6$02ddf3d0$0200a8c0@carl2000>
libwww is very frustrating!  Has a mind of it's own, I swear...

I need to post data (NOT form data, just raw data) and get the response in an HTChunk.

Unfortunately, HTPostAnchor inevitably writes the response to a file, while HTPostFormDataToChunk requires that the POST
data be form data.  So far, my attempts to merge the two, and the suggestions of several others have resulted in
absolutely no change in behavior whatsoever.

In particular, this doesn't work;

HTChunk * HTPostAnchorToChunk(HTParentAnchor *  source, HTAnchor*
        destination, HTRequest* request)
{
  if (source && destination && request)
 {
   HTChunk * chunk = NULL;
   HTStream * target = HTStreamToChunk(request, &chunk, -1);
   HTRequest_setOutputStream(request, target);
   if (HTPostAnchor(source, destination, request))
    return chunk;
   else
  {
    HTChunk_delete(chunk);
    return NULL;
   }
  }
  return NULL;
}

.. although it sure seems like it ought to.

What's the secret?

-cd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.