- From: Roland Bickel <r.bickel@cmg.nl>
- Date: Mon, 23 Apr 2001 16:27:51 +0200
- To: "'www-lib@w3.org'" <www-lib@w3.org>
Hello everybody !!
I hope some of you guys can help me with this.. i'm right now able to POST a
message to a HTTP server (responses to my last question still heavily
appreciated !!) , and i'm also a receiving a response. Mostly, i'm using the
HTPostAnchor function to do this.
My question is : How can I retrieve the answer from the POST request,
without reading it from file ?? I scanned through the w3c libwww archive,
and tried the HTPostAnchorToChunk function of Aileen, but to no avail :-(.
My terminate handler always says that the chunk is null.. I'm using
asynchronous sockets, btw..
structure of the prog is like
terminatehandler(....)
{
printf("test %s\n", HTChunk_toCString((HTChunk *)param);
/* more irrelevant stuff */
}
HTPostAnchorToChunk(...)
{
HTChunk * chunk = NULL;
HTStream *target = HTStreamToChunk(request, &chunk, 0);
if (chunk)
{
HTNetaddAfter(terminate_handler, NULL, chunk, HT_ALL,
HT_FILTER_LAST);
/* rest as in Aileen's example */
}
}
main()
{
HTProfile_newHTMLnoCachecClient(....);
/* set up some events and callbacks to do other stuff */
/* Create anchors and so on.. */
HTPostAnchorToChunk(..);
HTEventloop_newlist();
}
am i forgetting something ??
help appreciated !!
with kind regards,
Roland Bickel
Received on Monday, 23 April 2001 10:26:07 UTC