Thanks for your reply. curl_easy_setopt(curl, CURLOPT_URL , " <http://10.31.251.161:5985/wsman> http://10.31.251.161:5985/wsman <http://10.31.251.161:5985/wsman> "); The above line returns 0, means successful. But, the success of above line, I guess, doesn't indicate that connection to http://10.31.251.161:5985/wsman <http://10.31.251.161:5985/wsman> has actually established. This success, I think, just tells that curl_easy_setopt has done what it was supposed to. Am I right? Regards. Nitin
________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Corcoran, Jason Sent: Tuesday, December 15, 2009 10:43 AM To: libcurl development Cc: [email protected] Subject: Re: CURLOPT_URL returning FALSE 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. postInformaticav9logo <http://www.informatica.com/9> -----Original Message----- From: <mailto:[email protected]> [email protected] [ <mailto:[email protected]> mailto:[email protected]] On Behalf Of <mailto:[email protected]> [email protected] Sent: Tuesday, December 15, 2009 10:01 AM To: <mailto:[email protected]> [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> 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
