cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_POST is not returning anything

From: Lars Nilsson <chamaeleon_at_gmail.com>
Date: Fri, 11 Dec 2009 10:34:43 -0500

On Fri, Dec 11, 2009 at 7:01 AM, Isaac Sanni-Thomas
<isaacsannithomas_at_gmail.com> wrote:
>
> 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);

Additionally, it may be necessary for the server to receive a header
"SOAPAction:" to get a proper response. SOAP servers can be so picky
sometimes..

Lars Nilsson
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-11