I have written api in php and consuming that api in php to make crud operations, but delete method is not working.
}
else if($_SERVER['REQUEST_METHOD'] == 'DELETE'){
$del_id = $_GET["issuse_id"];
$url = 'http://192.168.0.82/ITS/Controller/issues'. $del_id;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response_json = curl_exec($ch);
curl_close($ch);
$data=json_decode($response_json, true);
return $data;
From your post, I would guess that the issue you are having is likely due to wrong concatenation.
This line here:
$url = 'http://192.168.0.82/ITS/Controller/issues'. $del_id;
should instead be
$url = 'http://192.168.0.82/ITS/Controller/issues?del_id='. $del_id;