How to send DELETE request to phil sturgeon's - codeigniter-restserver
According the the HTTP spec DELETE cannot send parameters. It can have things in the URL, so you could change this to:
public function user_delete($id){ $this->response(array( 'returned from delete:' => $id, ));}
I had the same problem an this work for me
1 -> in REST_Controller.php replace the default _parse_delete() function by :
protected function _parse_delete(){ $this->_delete_args = $_DELETE; $this->request->format and $this->request->body = file_get_contents('php://input'); // Set up out DELETE variables (which shouldn't really exist, but sssh!) parse_str(file_get_contents('php://input'), $this->_delete_args);}
That's all! no more need of " user_delete($id) ""