curl-library
Re: Can i access response of HTTP POST other than callback mechanism?
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 29 Aug 2005 16:30:24 +0200 (CEST)
Date: Mon, 29 Aug 2005 16:30:24 +0200 (CEST)
On Mon, 29 Aug 2005, Satish Mittal wrote:
> In the same way, can i access the entire response ONLY through the
> CURLOPT_WRITEFUNCTION callback?
No.
> My requirement is to write the POST response in a buffer in memory( whose
> maximum size may be fixed also, if user gives an input).
Then make your callback that way. For example like the getinmemory.c example
works: http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c
> Is there a libcurl API available, which can fill the response in my buffer
> in one shot, or which gives me the pointer to response data which i can then
> copy in my own buffer.
The write callback gives you the response data, so that you can copy it!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-08-29