File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,21 @@ This allows you to implement a RESTful interface easily:
3535
3636` REST_Controller ` also supports ` PUT ` and ` DELETE ` methods, allowing you to support a truly RESTful interface.
3737
38+
3839Accessing parameters is also easy. Simply use the name of the HTTP verb as a method:
3940
4041 $this->get('blah'); // GET param
4142 $this->post('blah'); // POST param
4243 $this->put('blah'); // PUT param
43- $this->delete('blah'); // DELETE param
44+
45+ The HTTP spec for DELETE requests precludes the use of parameters. For delete requests, you can add items to the URL
46+
47+ public function index_delete($id)
48+ {
49+ $this->response(array(
50+ 'returned from delete:' => $id,
51+ ));
52+ }
4453
4554## Content Types
4655
You can’t perform that action at this time.
0 commit comments