cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_URL returning FALSE

From: <nitin.mittal_at_rsa.com>
Date: Mon, 14 Dec 2009 23:31:21 -0500

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 <http://curl.haxx.se/libcurl/c/curl_easy_init.html> ();
  if(curl) {
    curl_easy_setopt <http://curl.haxx.se/libcurl/c/curl_easy_setopt.html> (curl, CURLOPT_URL <http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL> , "http://10.31.251.161:5985/wsman");
     
    curl_easy_cleanup <http://curl.haxx.se/libcurl/c/curl_easy_cleanup.html> (curl);
  }
  return 0;
}

Am I missing something? Please suggest.

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