curl-library
curlopt_writefunction Questions
Date: Mon, 12 Apr 2004 16:22:23 -0700 (PDT)
Hi all,
I'm using the curlopt_writefunction option to pass the
response data from the HTTP server to a string in my
application directly. I tried the example in the
"getinmemory.c" code, and it worked. However, I
realized that multiple calls to the write function may
be made per a single transaction. So, in this case, I
actually need a global string and keep appending to
this string whenever the write function is called.
Otherwise, I end up with a string that gets
overwritten. So, my first question is: Is keeping a
global string the correct way of handling this issue?
Secondly, for the CURLOPT_WRITEDATA option, the
example code passed in the address of a structure
"chunk" Does this option always expect a structure?
I tried passing in the address of a string, but when I
run the program, I get this error message:
"curlErrorCode: 56, errorBuffer: Received problem 3 in
the chunky parser"
Thanks for your time and help.
Regards,
Monica
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
Received on 2004-04-13