title: Codeigniter RESTful API - {"status":false,"error":"Unknown method."}
body: <p>I've managed to setup the RESTful API in my Codeigniter Application. Now I want to get some data from my MySQL database, so in my Codeigniter models folder I have created a model called category_model.php:</p>
  
  <pre><code>&lt;?php
    Class category_model extends CI_Model {
        var $table_name = 'category';
  
       function get_all_categories()
       {
         $this-&gt;db-&gt;select('*');
         $this-&gt;db-&gt;from($this-&gt;table_name);
         return $this-&gt;db-&gt;get();
       }
   }
  ?&gt;
  </code></pre>
  
  <p>Then in the Codeigniter controller-folder I created a category.php file:</p>
  
  <pre><code>&lt;?php
  
   include(APPPATH.'libraries/REST_Controller.php');
  
   class Category extends REST_Controller {
  
    function __construct()
      {
          parent::__construct();
          $this-&gt;load-&gt;model('category_model');
      }
  
    function category_get()
      {
          $data = $this-&gt;category_model-&gt;get_all_categories();
          $this-&gt;response($data);
      }
  
   }
  
  ?&gt;
  </code></pre>
  
  <p>Now, when I enter <code>http://localhost/myproejcts/ci/index.php/category/category</code> - I get the error <code>{"status":false,"error":"Unknown method."}</code> ??</p>
  
  <p>what is the issue?</p>
  
  <p><strong>[UPDATE]</strong> = I get the same error when setting <code>function index_post()</code></p>