curl-library
Multi-part HTTP POST and Read callback
Date: Tue, 23 Nov 2004 13:13:53 +0000
Hi,
I need to send a multi-part HTTP POST request that has some XML in the
first part and then some binary data in the second part.
The "curl_formadd" function lets me specify the data for a part either
as a file or as a buffer.
My binary data comes from a stream and I do not want to copy all the
data in a buffer (the data could be quite big) and then pass that buffer
to create the part.
What I need is to set a read callback function for one part and let
libcurl ask for the data for the binary part. Now this is possible for
ordinary POST requests but from the API docs it does not seem possible
for multi-part forms (or may-be I am wrong?).
I browsed the mailing-list archives to see if anybody had the same
problem and to find an answer for it.
I found this message from Daniel Stenberg dated April 2004:
http://curl.haxx.se/mail/lib-2004-04/0239.html
Basically it seems that I can't add read callbacks with libcurl for a
specific part (but I might be missing something). The message linked
above was written in April, I was wondering if things have changed since
then?
Is is possible to add a read callback for a part in a multi-part POST
using the curl_multi API?
Thanks for the help!
Best regards,
Arpad Zoldi
Received on 2004-11-23