cURL / Mailing Lists / curl-library / Single Mail


Multi-Part Post or Single Post ??

From: Ram <>
Date: Wed, 8 Sep 2004 03:04:51 -0700 (PDT)

   I want to post some huge data.
   I have 4 names and 4 values to be posted.
  buf = "name1=value1&name2=value2&name3&value4".
 for this i have to allocated a huge buf which consists of the above string.
 But the length of each value itself is say 100KB.
 so i need to allocate 4 bufs each of length 100KB and store the values into that.
I generate the data on the fly.
This is waste of mem. I want curl to collect my name and value.
and then send it in one go like single-post ?.
After getting all the values. i need to allocate a huge buf of 100 * 4 = 400 KB + space for
the names and then use set_easy_set_opt (CURLOPT_POSTFIELDS) and send the buf.
This can be done.
But, i read about multi-post.
For Each name and value u call curl_formadd and finally say easy_perform.
This can be done. but the reciever will get the each name and value seperated by some
mime info or some other info.
But can i do the above without any header (mime info or any other info).
How do i do that.
I want the reciever to get a single buf which consists of "name1=value1&name2=value2&name3&value4".
that is the reciever should not know if i have done multi-post or a single post.
Can i do like this ?.

Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
Received on 2004-09-08