cURL / Mailing Lists / curl-library / Single Mail

curl-library

Sending binary data through CURL

From: neeraj pandey <neeraj_star2004_at_yahoo.com>
Date: Thu, 19 Dec 2013 20:31:52 +0800 (SGT)

Hi All, I am a C++ user of CURL (libcurl). I wanted to know how can I send binary data through CURL. I know how to transfer binary file but my problem is different. I have binary data(May be pdf, doc etc contents) in a variable(not stored in a file) and I want to send them to some http server through CURL. Can any body suggest me how can I post the binary data stored in a C++ vaiable? Say std::string binaryData = "SOME BINARY DATA" Now, how can I post binaryData to http server through CURL ?

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-19