On Dec 14, 2009, at 8:45 PM, "[email protected]" <[email protected] > wrote:


 sending the mail again as some junk got introduced in the sample code
below.

Regards.


http://www.informatica.com/9
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Tuesday, December 15, 2009 10:01 AM
To: [email protected]
Subject: CURLOPT_URL returning FALSE


Hi,

I am just trying to send some POST data to a windows server.

But, CURLOPT_URL, which is the very first line in my code, which sets
the URL to the server to which I am sending POST data, returns false.

Please find the code sample below:


#include <stdio.h>
#include <curl/curl.h>

int main(void)
{
  CURL *curl;
  CURLcode res;

  curl = curl_easy_init ();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_URL ,
"http://10.31.251.161:5985/wsman";);    // this call returns FALSE
?????????????

    curl_easy_cleanup(curl);
  }
  return 0;
}

Am I missing something? Please suggest.

Thanks & Regards,
Nitin



If a curl_easy_setopt returns a 0 it is sucessful. Please look at the return value for this call in the doc. It does not return a bool.

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

Reply via email to