Can anyone let me know how to use http delete method. am trying to achieve that using curl but it is giving http code 0 which i don't understand. can anyone please tel me what else need to be added to the bellow code
$url = 'https://api.rezdy.com/v1/bookings/R1Z8HKV/?apiKey=f125ad643aff4cbe98043302424a###';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
$api_response = curl_exec($ch);
$api_response_info = curl_getinfo($ch);
curl_close($ch);
$api_response_header = trim(substr($api_response, 0, $api_response_info['header_size']));
$api_response_body = substr($api_response, $api_response_info['header_size']);
echo $api_response_info['http_code'];
echo "<br><br>";
echo $api_response_header;
echo "<br><br>";
echo $api_response_body;
echo "<br><br>";