0

I have a Codeigniter 3 API system that is based on chriskacerguis/codeigniter-restserver.

Now, everything was working OK, but for some reason the system stopped detecting DELETE request types. Whenever I send a DELETE request it is identified as a GET request.

I am sending my requests via Postman for Chrome

Has anyone come across this issue before?

EDIT:

My controller lookst like so:

class MyClass extends REST_Controller{
   public function test_GET(){ /* This is called when I access the API with a GET request*/}
   public function test_DELETE(){ /* Similarly, this will be called upon DELETE request*/ }
}

My url for the first method would be

http://localhost/api/MyClass/test?API-KEY=XXXXXXXXXX&x=y

The REST_Controller identifies this here:

$controller_method = $object_called.'_'.$this->request->method;

Dvir Levy
  • 8,018
  • 11
  • 39
  • 60
  • I had a similar problem and for quick solution I used post and created new hidden field with the name _method and value DELETE. But if you want to check further you may find your answer here: http://stackoverflow.com/questions/165779/are-the-put-delete-head-etc-methods-available-in-most-web-browsers – Lucas Serafim Aug 12 '15 at 16:38
  • What http server are you using? – N.B. Aug 13 '15 at 14:47

0 Answers0