cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Uploading with POST and read_callback not just a file

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 20 Sep 2011 16:37:12 +0200 (CEST)

On Tue, 20 Sep 2011, Oleksiy wrote:

> Daniel Stenberg: with debug-callback I found out that for some reason
> only header is sent, and body isn't

Because you didn't set CURLOPT_POST it did a GET instead and didn't even try
to call the read callback. Here's an example doing something similar to what
you're doing:

         http://curl.haxx.se/libcurl/c/post-callback.html

But as Julien pointed out, if you want to do multipart formpost, I suggest you
instead use the API we've made for this. See example at:

         http://curl.haxx.se/libcurl/c/multi-post.html

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