cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: What differs?

From: Fredrik Gustafsson <iveqy_at_iveqy.com>
Date: Wed, 21 Feb 2007 19:26:59 +0100

On Wed, Feb 21, 2007 at 03:18:46PM +0100, Daniel Stenberg wrote:
> On Wed, 21 Feb 2007, Fredrik Gustafsson wrote:
>
> >Hi, I've got a c++ program, that should do the same task as a command
> >line. The thing is, it doesn't and I can't find out what differs the to.
>
> With curl 7.16.1 and later, append "--libcurl [filename]" to get a C
> program written that replicates what the command line does!
>
> > curl_easy_setopt(con, CURLOPT_POST, post.c_str());
>
> This is wrong. CURLOPT_POSTFIELDS is probably what you want.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Thank you! What a wounderful function. Sadly I'm not using curl 7.16.1
or above yet. But the CURLOPT_POSTFIELDS solution worked fine.
Received on 2007-02-21