- From: Carl Daniel <cpdaniel@pacbell.net>
- Date: Fri, 09 Aug 2002 09:58:40 -0700
- To: www-lib@w3.org
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
Received on Friday, 9 August 2002 12:58:42 UTC