title: Why curl function is returning Resource id #4?
body: <p>I am trying to post a form in json format using curl to Launch 27 to create a booking. My json data is:</p>
  
  <pre><code>  {"booking":{
    "id":55,
    "user_id":5,
    "service_date":"2015-08-15T13:00",
    "services":[{
      "id":1,
      "extras":[{
        "extra_id":1,
        "quantity":1
      }],
      "pricing_parameters":[{
        "pricing_parameter_id":1,
        "quantity":1
      }],
      "service_maids":1,
      "service_hours":1
    },{
      "id":2,
      "extras":[],
      "pricing_parameters":[],
      "service_maids":1,
      "service_hours":2
    }],
    "frequency_id":1,
    "address":"595 Market St",
    "city":"San Francisco",
    "state":"CA",
    "zip":"94105",
    "phone":"462-485-0790",
    "price":"202.0",
    "final_price":"202.0",
    "completed":false,
    "payment_method":"stripe",
    "active":true,
    "discount_code":null,
    "customer_comments":null,
    "sms_notifications":false,
    "flexibility":0,
    "custom_fields":{
      "custom_text":"text",
      "custom_dropdown":{"values":"1"},
      "custom_radio":{"values":"2"}
    }
  }}
  </code></pre>
  
  <p>and curl function for this is:</p>
  
  <pre><code>  function curl_post($url,$postData){
      $postData = json_encode($postData);
      if(!isset($timeout))
          $timeout=30;
      $curl = curl_init();
       if(isset($referer)){
          curl_setopt ($curl, CURLOPT_REFERER, $referer);
      }
      curl_setopt ($curl, CURLOPT_URL, $url);
      curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout);
      curl_setopt ($curl, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)');
      curl_setopt ($curl, CURLOPT_HEADER, false);
      curl_setopt ($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, false);
      curl_setopt ($curl, CURLOPT_POST, true);
      curl_setopt ($curl, CURLOPT_POSTFIELDS, $postData);
      curl_setopt ($curl, CURLOPT_HTTPHEADER,
          array('X-API-Key: my_test_api_key',
          "Content-Type: application/json",
          "Accept: application/launch27.v2"));
      $html = curl_exec ($curl);
      curl_close ($curl);
      return $html;
  }
  </code></pre>
  
  <p>Here the given json is sent into <code>$postData</code> and <code>$url=https://acme-sandbox.l27.co/api/bookings</code>
  It returns me resourse id #4... I am totally confused about what is going on. I am following Launch 27's documentation <a href="https://bitbucket.org/awoo23/api-2.0/wiki/Create_booking" rel="nofollow">https://bitbucket.org/awoo23/api-2.0/wiki/Create_booking</a>.</p>
  
  <p>I have searched about it but couldn't find sufficient criteria to resolve this. Can you please help me.</p>