cURL / Mailing Lists / curl-library / Single Mail

curl-library

Nested multipart MIME

From: Paul Apostolescu <apbogdan_at_hotmail.com>
Date: Sat, 19 Nov 2011 23:14:33 +0000

I'm trying to do an HTTP POST that contains a nested multipart MIME payload using libcurl but I cannot figure our how - is this supported ? If not can somebody point me to some code examples/source on how can I reuse some of formdata in functionality to implement that.
Below is an example payload. Thanks
Content-Type: multipart/mixed; boundary=----------------------------06f4eb8c4282
------------------------------06f4eb8c4282Content-Type: multipart/mixed; boundary=----------------------------56f4eb8c4122
------------------------------56f4eb8c4122Content-Type: application/jsonContent-Disposition: attachment; filename="bla_1_1"
{"msg":"bla_1_1"}------------------------------56f4eb8c4122Content-Type: application/jsonContent-Disposition: attachment; filename="bla_1_2"
{"msg":"bla_1_2"}------------------------------56f4eb8c4122--
------------------------------06f4eb8c4282Content-Type: multipart/mixed; boundary=----------------------------3125eb8c1111
------------------------------3125eb8c1111Content-Type: application/jsonContent-Disposition: attachment; filename="bla_2_1"
{"msg":"bla_2_1"}------------------------------3125eb8c1111Content-Type: application/jsonContent-Disposition: attachment; filename="bla_2_2"
{"msg":"bla_2_2"}------------------------------56f4eb8c4122--
------------------------------06f4eb8c4282--

                                               

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-20