W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2001

get body of a response

From: Wang, Xinju <Xinju.Wang@ugs.com>
Date: Thu, 1 Nov 2001 18:40:57 -0600
Message-ID: <07E98776DFF1BE448D9C9BA60A79ADA49F9687@amwntx1.ugsolutions.com>
To: "'www-lib@w3.org'" <www-lib@w3.org>
Hi, All,

I send a PROPFIND request to the server and I can see the correct response
in the server's log but I couldn't get the response's body in my code. The
return code is the correct 206, multistatus. There is no such method in
HTResponse.c like HTResponse_body(). I tried to use code from

// skip the code that prepares the request
HTStream* target = HTStreamToChunk(request, &chunk, 0);
HTRequest_setOutputStream(request, target);

BOOL retval;
if( retval = HTLoad(request, NO) )
	char * string;
	string = HTChunk_toCString(chunk);
	HTPrint("%s", string ? string : "no text\n");

But I always get a empty string from the chunk. How can I read the body of a
response into a buffer? Since the chunk sample deals with the GET method,
I'm wondering if libwww treat status 200 and 206 different.

Thank you!
Received on Thursday, 1 November 2001 19:42:44 UTC

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