curl-library
Re: CURLOPT_POST is not returning anything
Date: Fri, 11 Dec 2009 12:01:16 +0000
On 12/11/2009 11:29 AM, Corcoran, Jason wrote:
>
>
> On Dec 11, 2009, at 3:17 AM, "nitin.mittal_at_rsa.com"
> <nitin.mittal_at_rsa.com> wrote:
>
>> rl_easy_setopt(mCurl, CURLOPT_POSTFIELDSIZE, sizeof(strHttpContent);
>
> You need to change the above to
>
> rl_easy_setopt(mCurl, CURLOPT_POSTFIELDSIZE, strHttpContent.length());
>
> You are mixing c++ with c stuff.
@Nitin - Yes. Jason is right
So you could get the C++ equiv which Jason states as strHttpContent.length()
NB://One more thing, after curl_easy_perform() free the headers you set
try this too as part of the headers
struct curl_slist *headers=NULL;
headers = curl_slist_append(headers, "Content-Type: Multipart/Related");
headers = curl_slist_append(headers, "type: text/xml");
curl_easy_perform(mCurl);
curl_slist_free_all(headers);
lets see how this goes.
regards,
Isaac
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-11