cURL / Mailing Lists / curl-library / Single Mail

curl-library

binary data post form buffer

From: Hanno L. Kranzhoff <kranzhoff_at_neptunelabs.com>
Date: Fri, 30 Nov 2001 16:08:24 +0100

Hi
I'm using libcurl with c++ win32 to post
binary data from client to server via
http-post.
Currently I'm using

---
curl_formadd(&m_formpost, &m_lastptr, CURLFORM_COPYNAME, "data",
                   CURLFORM_FILE, "data.dat", CURLFORM_END);
---
to accomplish that.
Is there a way to post in the same way (multipart/form-data with
boundary) but without using a file as input ?
I would like to use e.g char* or something similara s input.
CURLFORM_PTRCONTENTS doesn't help, as data is sent urlencoded w/o
boundaries.
many thanks in advance,
Hanno
Received on 2001-11-30