Even that doesn't work for me...

Also  "std::string strHttpContent" contains some variables whose values
are populated at run time, so I can't provide a plain char* instead I
first populate strHttpContent & then feed strHttpContent .c_str() to
CURLOPT_POSTFIELDS.



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Daniel Stenberg
Sent: Monday, December 07, 2009 3:37 PM
To: libcurl development
Subject: RE: How to prepare a setup for libcurl development

On Mon, 7 Dec 2009, [email protected] wrote:

> Daniel, do you have an example code illustrating the use of CURL_POST?

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

>       std::string strHttpContent = "";

>               // Now specify the POST data
>               curl_easy_setopt(mCurl, CURLOPT_POSTFIELDS,
> strHttpContent);

Eeeek, you need to provide a plain char * to this option, not a C++
string 
object.

-- 

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

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

Reply via email to