cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_URL returning FALSE

From: Isaac Sanni-Thomas <isaacsannithomas_at_gmail.com>
Date: Tue, 15 Dec 2009 06:26:39 +0000

On 12/15/2009 06:13 AM, nitin.mittal_at_rsa.com wrote:
> True.
>
> But, after curl_easy_perform() is called, how do I know which out of
> the following lines didn't actually work? Was there any problem with
> CURLOPT_POSTFIELDS or the connection with
> http://10.31.251.161:5985/wsman was not established or it didn't accept
> strHttpContent.c_str() etc.
>
> * curl_easy_setopt(mCurl,
> CURLOPT_POSTFIELDS,"user=administrator&pas=collect_at_234")
> * curl_easy_setopt(mCurl, CURLOPT_URL,
> "http://10.31.251.161:5985/wsman")
> * curl_easy_setopt(mCurl, CURLOPT_POST, 1)
> * curl_easy_setopt(mCurl, CURLOPT_POSTFIELDS,
> strHttpContent.c_str())
> * curl_easy_setopt(mCurl, CURLOPT_POSTFIELDSIZE,
> strHttpContent.length())
>
> curl_easy_perform(mCurl)
>
Hi Nitin,

Add this line to your code after curl_easy_init();

curl_easy_setopt(mCurl, CURLOPT_VERBOSE, TRUE);

This will help you know what happens at every level. Its like debugging.

regards,
Isaac
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-15