- From: François Nicot <fnicot@silicom.fr>
- Date: Wed, 25 Apr 2001 14:32:05 +0200
- To: "Ailleen Lien" <alien@clientsoft.com>, "'Roland Bickel'" <r.bickel@cmg.nl>
- Cc: <www-lib@w3.org>
Hi All, Thanks Ailleen for you proposal, but I still have the same problem as Roland with the same case : chunk data and chunk size are both Null. Opposite to this, Appache log and my log files tell me that the POST method ended with 200 (OK) HTTP Status and that data size in the HTTP stream match what I expected. Where are the data gone ? BTW, is that correct that the format has to be text/xml ? thanks a lot for further ideas François. -----Message d'origine----- De : Ailleen Lien <alien@clientsoft.com> À : 'Roland Bickel' <r.bickel@cmg.nl> Cc : 'www-lib@w3.org' <www-lib@w3.org> Date : lundi 23 avril 2001 17:47 Objet : RE: POST - how to retrieve the response ?? HELP !! > Do you have HTRequest_setOutputFormat() after HTRequest_new()? If you do >not have, You still get Null String back from HTPostAnchorToChunk(). > > /* Create a request */ > request = HTRequest_new(); > HTRequest_setOutputFormat(request, HTAtom_for("text/xml") > >Good Luck > >Aileen > >-----Original Message----- >From: Roland Bickel [mailto:r.bickel@cmg.nl] >Sent: Monday, April 23, 2001 10:28 AM >To: 'www-lib@w3.org' >Subject: POST - how to retrieve the response ?? HELP !! > > > >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 Wednesday, 25 April 2001 08:35:07 UTC