title: RESTful client in c
body: <p>Hi I want to make RESTful call to remote sever.
  url is <a href="http://bulksms.net/API.svc/sms/json/sendmessage?username=newuser&amp;password=newpasswd&amp;msg=test&amp;msisdn=9999999999&amp;tagname=Demo&amp;shortcode=8888&amp;telcoId=5&amp;dnRequired=false" rel="nofollow">http://bulksms.net/API.svc/sms/json/sendmessage?username=newuser&amp;password=newpasswd&amp;msg=test&amp;msisdn=9999999999&amp;tagname=Demo&amp;shortcode=8888&amp;telcoId=5&amp;dnRequired=false</a>
  The server document says:</p>
  
  <pre><code>Parameters
  </code></pre>
  
  <p>string username, string password, string msg, string msisdn, string tagname, string shortcode, int telcoId, bool dnRequired</p>
  
  <p>Return Value
  API will return and object containing three members
  IsSuccess 
  Message
  UniqueId</p>
  
  <p>I have made a sample client in c but its not working. below is my code.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;curl/curl.h&gt;
  
  int main(int argc, char *argv[])
  {
    CURL *curl;
    char url[80];
    CURLcode res;
  
    strcpy(url,"http://bulksms.net/API.svc/sms/json/sendmessage?username=newuser&amp;password=newpasswd&amp;msg=test&amp;msisdn=9999999999&amp;tagname=Demo&amp;shortcode=8888&amp;telcoId=5&amp;");
  
    curl = curl_easy_init();
    if(curl) {
      curl_easy_setopt(curl, CURLOPT_URL, url);
      curl_easy_setopt(curl, CURLOPT_POST, url);
  
      res = curl_easy_perform(curl);
      curl_easy_cleanup(curl);
    }
    return 0;
  }
  </code></pre>
  
  <p>Output :</p>