我有一个基于chriskacerguis/codeigniter-restserver的Codeigniter 3 API系统。
现在,一切正常,但由于某种原因,系统停止检测DELETE
个请求类型。
每当我发送DELETE
请求时,都会将其标识为GET
请求。
之前有没有人遇到过这个问题?
编辑:
我的控制器看起来像这样:
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;