On Mon, 22 Feb 2010, Dragomir Nikolov wrote:

I need a libCurl C example
for HTTP POST of a binary file (in Windows). The following curl
example does exactly what I need, but I have to embed it within a C
program:
curl -k --data-binary
@myfile.xml -H "Content-Type: text/xml" https://localhost:4445/test

Some good ideas:

 curl --libcurl basics.c [command line]

and some curl_easy_setopt options to read up on:

 CURLOPT_POSTFIELDS
 CURLOPT_POSTFIELDSIZE
 CURLOPT_READFUNCTION

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to