W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2001

POST - how to retrieve the response ?? HELP !!

From: Roland Bickel <r.bickel@cmg.nl>
Date: Mon, 23 Apr 2001 16:27:51 +0200
Message-ID: <3177CCDB4298D311B3CC0050043AF430946DCF@NL-UTH-MAIL02>
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 

	printf("test %s\n", HTChunk_toCString((HTChunk *)param);

	/* more irrelevant stuff */

	HTChunk * chunk = NULL;
	HTStream *target = HTStreamToChunk(request, &chunk, 0);
	if (chunk)
		HTNetaddAfter(terminate_handler, NULL, chunk, HT_ALL,
		/* rest as in Aileen's example */

	/* set up some events and callbacks to do other stuff */

	/* Create anchors and so on.. */



am i  forgetting something ?? 
help appreciated !!

with kind regards,
Roland Bickel
Received on Monday, 23 April 2001 10:26:07 UTC

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