HTTP DELETE请求以GET形式出现

时间:2015-08-12 16:23:11

标签: php codeigniter rest http postman

我有一个基于chriskacerguis/codeigniter-restserver的Codeigniter 3 API系统。

现在,一切正常,但由于某种原因,系统停止检测DELETE个请求类型。 每当我发送DELETE请求时,都会将其标识为GET请求。

我是通过Postman for Chrome

发送请求的

之前有没有人遇到过这个问题?

编辑:

我的控制器看起来像这样:

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*/ }
}

我的第一个方法的网址是

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

REST_Controller在此标识:

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

0 个答案:

没有答案