title: Why the response shows blank from REST service request
body: <p>I am working on REST Services for implementing online hotel booking. According to REST service provider we need to send REST request with the input in JSON format.  JSON format according to service provider document is:</p>
  
  <pre><code>{
  "ResultIndex": "1",
  "HotelCode": "128407",
  "HotelName": "Nieuw Slotania Hotel",
  "GuestNationality": "IN",
  "NoOfRooms": 4,
  "ClientReferenceNo": 0,
  "HotelRoomsDetails": [
  {
  "RoomIndex": "1",
  "RoomTypeCode": "Xv+rPD4t1XERkUWumdalig==|ST|CG-FIT|221###",
  "RoomTypeName": "DOUBLE STANDARD",
  "RatePlanCode": "BB-E10",
  "BedTypeCode": null,
  "SmokingPreference": 0,
  "Supplements": null,
  "Price": {
  "CurrencyCode": "INR",
  "RoomPrice": "9518.05",
  "Tax": "0.0",
  "ExtraGuestCharge": "0.0",
  "ChildCharge": "0.0",
  "OtherCharges": "0.0",
  "Discount": "0.0",
  "PublishedPrice": "9518.05",
  "PublishedPriceRoundedOff": "9518",
  "OfferedPrice": "9518.05",
  "OfferedPriceRoundedOff": "9518",
  "AgentCommission": "0.0",
  "AgentMarkUp": "1241.48",
  "ServiceTax": "99.32",
  "TDS": "0.0"
  },
  ],
  "EndUserIp": "123.1.1.1",
  "TokenId": "df141129-c8f1-4a56-84ca-14483e148e75",
  "TraceId": "625e8d04-afdc-496c-bb43-39ba59554f89"
  }
  </code></pre>
  
  <p>And at our side we used  “curl” for  executing  web service with following  JSON  input:
  JSON INPUT AT OUR SIDE using PHP:</p>
  
  <pre><code>$temp='{
  "ResultIndex": "1",
  "HotelCode": "'.$_HotelCode.'",
  "HotelName": "'.$_HotelName.'",
  "GuestNationality": "IN",
  "NoOfRooms": 4,
  "ClientReferenceNo": 0,
  "HotelRoomsDetails": [
  {
  "RoomIndex": "1",
  "RoomTypeCode": "'.$_RoomTypeCode.'",
  "RoomTypeName": "'.$_RoomTypeName.'",
  "RatePlanCode": "'.$_RatePlanCode.'",
  "BedTypeCode": null,
  "SmokingPreference": 0,
  "Supplements": null,
  "Price": {
  "CurrencyCode": "INR",
  "RoomPrice": "'.$_RoomPrice.'",
  "Tax": "'.$_Tax.'",
  "ExtraGuestCharge": "0.0",
  "ChildCharge": "0.0",
  "OtherCharges": "0.0",
  "Discount": "0.0",
  "PublishedPrice": "'.$_PublishedPrice.'",
  "PublishedPriceRoundedOff": "'.$_PublishedPriceRoundedOff.'",
  "OfferedPrice": "'.$_OfferedPrice.'",
  "OfferedPriceRoundedOff": "'.$_OfferedPriceRoundedOff.'",
  "AgentCommission": "'.$_AgentCommission.'",
  "AgentMarkUp": "'.$_AgentMarkUp.'",
  "ServiceTax": "'.$_ServiceTax.'",
  "TDS": "'.$_TDS.'"
  }
  }
  ],
  "EndUserIp": "192.168.0.1",
  "TokenId": "'.$token_id.'",
  "TraceId": "'.$_TraceId.'"
  }';
  
  
  WE EXECUTE  IT  AS FOLLOWS:
  
  
  $resp_hotel_room= (array) ExecuteURL($url,$temp);            
  </code></pre>
  
  <p>Where  <strong>ExecuteURL</strong>  is our customized CURL execution function. The output <strong>“$resp_hotel_room”</strong> did not come and   <strong>curl status show as 400</strong> . </p>